drainer

package
v4.2.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	WorkerName    string         `long:"name" required:"true" description:"The name of the worker you wish to drain."`
	BeaconPidFile string         `long:"beacon-pid-file" description:"Path to beacon pid file."`
	IsShutdown    bool           `long:"shutdown" description:"Whether worker is about to shutdown."`
	Timeout       *time.Duration `long:"timeout" description:"Maximum time to wait for draining to finish."`
	TSAConfig     tsa.Config     `group:"TSA Configuration" namespace:"tsa" required:"true"`
}

func (*Config) Execute

func (cmd *Config) Execute(args []string) error

type Drainer

type Drainer struct {
	BeaconClient beacon.BeaconClient
	IsShutdown   bool
	WatchProcess WatchProcess
	WaitInterval time.Duration
	Clock        clock.Clock
	Timeout      *time.Duration
}

func (*Drainer) Drain

func (d *Drainer) Drain(logger lager.Logger) error

type WatchProcess

type WatchProcess interface {
	IsRunning(lager.Logger) (bool, error)
}

func NewBeaconWatchProcess

func NewBeaconWatchProcess(pidFile string) WatchProcess

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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