drainer

package
v0.0.0-...-670e406 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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