// NewReplicatedOrchestrator creates a new replicated Orchestrator. func NewReplicatedOrchestrator(store *store.MemoryStore) *Orchestrator { restartSupervisor := restart.NewSupervisor(store) updater := update.NewSupervisor(store, restartSupervisor) return &Orchestrator{ store: store, stopChan: make(chan struct{}), doneChan: make(chan struct{}), reconcileServices: make(map[string]*api.Service), restartTasks: make(map[string]struct{}), updater: updater, restarts: restartSupervisor, } }
// NewGlobalOrchestrator creates a new global Orchestrator func NewGlobalOrchestrator(store *store.MemoryStore) *Orchestrator { restartSupervisor := restart.NewSupervisor(store) updater := update.NewSupervisor(store, restartSupervisor) return &Orchestrator{ store: store, nodes: make(map[string]*api.Node), globalServices: make(map[string]globalService), stopChan: make(chan struct{}), doneChan: make(chan struct{}), updater: updater, restarts: restartSupervisor, } }