fake

package
v0.0.0-...-5e3b14e Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DrainStateInProgress = "in-progress"
	DrainStateDone       = "done"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Drainer

type Drainer struct {
	LastDrained   string
	DrainCount    int
	DrainDuration time.Duration
	Clock         clock.Clock

	States map[string]string
}

func (*Drainer) Assert

func (d *Drainer) Assert(t *testing.T, inProgressIDs string, doneIDs string)

Assert expects a comma-separated list of instance IDs for the inProgressIDs and doneIDs args. It checks whether all instance are in the wanted state. The IDs are sorted.

func (*Drainer) Drain

func (d *Drainer) Drain(id string) (int, error)

type Request

type Request struct {
	ID       string
	Fastpath bool
}

func NewRequest

func NewRequest(id string, fp bool) Request

func (Request) Clean

func (r Request) Clean() error

func (Request) Heartbeat

func (r Request) Heartbeat() error

func (Request) InstanceID

func (r Request) InstanceID() string

func (Request) UseFastpath

func (r Request) UseFastpath() bool

Jump to

Keyboard shortcuts

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