Remove parallel starting of COntrolPlaneProcesses
Right now the ControlPlane is actually just a thin layer around APIServer, this is the oly process we care for right now. Now that we only have one process to start, we can remove the parallel starting logic. In case we bring in more processes again this commit can just be reverted.
This commit is contained in:
parent
0df12db242
commit
e926d95717
|
|
@ -27,25 +27,7 @@ func NewControlPlane() *ControlPlane {
|
|||
|
||||
// Start will start your control plane. To stop it, call Stop().
|
||||
func (f *ControlPlane) Start() error {
|
||||
started := make(chan error)
|
||||
starter := func(process ControlPlaneProcess) {
|
||||
started <- process.Start()
|
||||
}
|
||||
processes := []ControlPlaneProcess{
|
||||
f.APIServer,
|
||||
}
|
||||
|
||||
for _, process := range processes {
|
||||
go starter(process)
|
||||
}
|
||||
|
||||
for range processes {
|
||||
if err := <-started; err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
return f.APIServer.Start()
|
||||
}
|
||||
|
||||
// Stop will stop your control plane, and clean up their data.
|
||||
|
|
|
|||
Loading…
Reference in New Issue