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:
Hannes Hörl 2017-12-13 14:09:22 +00:00
parent 0df12db242
commit e926d95717
1 changed files with 1 additions and 19 deletions

View File

@ -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.