Versions in this module Expand all Collapse all v0 v0.8.3 Apr 27, 2018 Changes in this version + const BatchUpdateInterval + const LimitStateQueriesPerSecond + const NodeDeadlineCoalesceWindow + func NewDeadlineHeap(ctx context.Context, coalesceWindow time.Duration) *deadlineHeap + func NewDrainingJobWatcher(ctx context.Context, limiter *rate.Limiter, state *state.StateStore, ...) *drainingJobWatcher + func NewDrainingNode(node *structs.Node, state *state.StateStore) *drainingNode + func NewNodeDrainWatcher(ctx context.Context, limiter *rate.Limiter, state *state.StateStore, ...) *nodeDrainWatcher + type DrainDeadlineNotifier interface + NextBatch func() <-chan []string + Remove func(nodeID string) + Watch func(nodeID string, deadline time.Time) + func GetDeadlineNotifier(ctx context.Context) DrainDeadlineNotifier + type DrainDeadlineNotifierFactory func(context.Context) DrainDeadlineNotifier + type DrainRequest struct + Allocs []*structs.Allocation + Resp *structs.BatchFuture + func NewDrainRequest(allocs []*structs.Allocation) *DrainRequest + type DrainingJobWatcher interface + Drain func() <-chan *DrainRequest + Migrated func() <-chan []*structs.Allocation + RegisterJobs func(job []structs.NamespacedID) + func GetDrainingJobWatcher(ctx context.Context, limiter *rate.Limiter, state *state.StateStore, ...) DrainingJobWatcher + type DrainingJobWatcherFactory func(context.Context, *rate.Limiter, *state.StateStore, *log.Logger) DrainingJobWatcher + type DrainingNodeWatcher interface + type DrainingNodeWatcherFactory func(context.Context, *rate.Limiter, *state.StateStore, *log.Logger, NodeTracker) DrainingNodeWatcher + func GetNodeWatcherFactory() DrainingNodeWatcherFactory + type MockNodeTracker struct + Events []*MockNodeTrackerEvent + Nodes map[string]*structs.Node + func NewMockNodeTracker() *MockNodeTracker + func (m *MockNodeTracker) Remove(nodeID string) + func (m *MockNodeTracker) TrackedNodes() map[string]*structs.Node + func (m *MockNodeTracker) Update(node *structs.Node) + type MockNodeTrackerEvent struct + NodeRemove string + NodeUpdate *structs.Node + type NodeDrainer struct + func NewNodeDrainer(c *NodeDrainerConfig) *NodeDrainer + func (n *NodeDrainer) Remove(nodeID string) + func (n *NodeDrainer) SetEnabled(enabled bool, state *state.StateStore) + func (n *NodeDrainer) TrackedNodes() map[string]*structs.Node + func (n *NodeDrainer) Update(node *structs.Node) + type NodeDrainerConfig struct + BatchUpdateInterval time.Duration + DrainDeadlineFactory DrainDeadlineNotifierFactory + JobFactory DrainingJobWatcherFactory + Logger *log.Logger + NodeFactory DrainingNodeWatcherFactory + Raft RaftApplier + StateQueriesPerSecond float64 + type NodeTracker interface + Remove func(nodeID string) + TrackedNodes func() map[string]*structs.Node + Update func(node *structs.Node) + type RaftApplier interface + AllocUpdateDesiredTransition func(allocs map[string]*structs.DesiredTransition, evals []*structs.Evaluation) (uint64, error) + NodesDrainComplete func(nodes []string) (uint64, error)