infra

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy(providers map[string]interface{}) (err error)

func OperateConcurrently added in v0.22.0

func OperateConcurrently(machines []Machine, cb func(Machine) error) error

func Try added in v0.22.0

func Try(monitor mntr.Monitor, timer *time.Timer, interval time.Duration, machine Machine, callback func(cmp Machine) error) error

Types

type Address

type Address struct {
	Location     string
	FrontendPort uint16
	BackendPort  uint16
}

func (Address) String

func (a Address) String() string

type Ingress

type Ingress struct {
	Pools            []string
	HealthChecksPath string
}

type Machine

type Machine interface {
	ID() string
	IP() string
	Remove() error
	Execute(stdin io.Reader, cmd string) ([]byte, error)
	Shell() error
	WriteFile(path string, data io.Reader, permissions uint16) error
	ReadFile(path string, data io.Writer) error
	RebootRequired() (required bool, require func(), unrequire func())
	ReplacementRequired() (required bool, require func(), unrequire func())
}

type Machines

type Machines []Machine

func (Machines) IDs added in v0.22.0

func (c Machines) IDs() []string

func (Machines) Len

func (c Machines) Len() int

func (Machines) Less

func (c Machines) Less(i, j int) bool

func (Machines) String

func (c Machines) String() string

func (Machines) Swap

func (c Machines) Swap(i, j int)

func (Machines) ToChan

func (c Machines) ToChan() <-chan Machine

type Pool

type Pool interface {
	EnsureMembers() error
	EnsureMember(Machine) error
	GetMachines() (Machines, error)
	AddMachine() (Machine, error)
}

type ProviderCurrent

type ProviderCurrent interface {
	Pools() map[string]Pool
	Ingresses() map[string]*Address
}

Jump to

Keyboard shortcuts

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