Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor supervises a set of updates. It's responsible for keeping track of updates, shutting them down and replacing them.
func NewSupervisor ¶
func NewSupervisor(store *store.MemoryStore, restartSupervisor *restart.Supervisor) *Supervisor
NewSupervisor creates a new UpdateSupervisor.
func (*Supervisor) CancelAll ¶
func (u *Supervisor) CancelAll()
CancelAll cancels all current updates.
func (*Supervisor) Update ¶
func (u *Supervisor) Update(ctx context.Context, cluster *api.Cluster, service *api.Service, slots []orchestrator.Slot)
Update starts an Update of `slots` belonging to `service` in the background and returns immediately. Each slot contains a group of one or more tasks occupying the same slot (replicated service) or node (global service). There may be more than one task per slot in cases where an update is in progress and the new task was started before the old one was shut down. If an update for that service was already in progress, it will be cancelled before the new one starts.
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater updates a set of tasks to a new version.
func NewUpdater ¶
func NewUpdater(store *store.MemoryStore, restartSupervisor *restart.Supervisor, cluster *api.Cluster, newService *api.Service) *Updater
NewUpdater creates a new Updater.