drainer

package
v0.0.0-...-a69e935 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 11 Imported by: 9

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL