Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drainer ¶
type Drainer interface { // Start the module Start() // Stop the module Stop() // GetAllDrainingHostInfos returns HostInfo of all DRAINING hosts. GetAllDrainingHostInfos() ([]*pbhost.HostInfo, error) // GetAllDrainedHostInfos returns HostInfo of all DRAINED hosts. GetAllDrainedHostInfos() ([]*pbhost.HostInfo, error) // GetAllDownHostInfos returns HostInfo of all DOWN hosts. GetAllDownHostInfos() ([]*pbhost.HostInfo, error) // StartMaintenance initiates putting a host into maintenance. StartMaintenance(ctx context.Context, hostname string) error // CompleteMaintenance brings a host out of maintenance. CompleteMaintenance(ctx context.Context, hostname string) error }
Drainer defines the interface for host drainer
func NewDrainer ¶
func NewDrainer( drainerPeriod time.Duration, pelotonAgentRole string, masterOperatorClient mpb.MasterOperatorClient, goalStateDriver goalstate.Driver, hostInfoOps ormobjects.HostInfoOps, taskEvictionQueue queue.TaskQueue, ) Drainer
NewDrainer creates a new host drainer
Click to show internal directories.
Click to hide internal directories.