fleet

package
v0.0.0-...-9d0dce2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundError = errgo.New("not found")
)

Functions

func IsNotFound

func IsNotFound(err error) bool

Types

type Event

type Event struct {
	UnitName string
	Message  string
}

type FleetConfig

type FleetConfig struct {
	Tunnel                string
	SSHUserName           string
	SSHTimeout            time.Duration
	StrictHostKeyChecking bool
	KnownHostsFile        string
	CAFile                string
	CertFile              string
	KeyFile               string
	EndPoint              string
	RequestTimeout        time.Duration
	EtcdKeyPrefix         string
	NoBlock               bool
	BlockAttempts         int
}

func DefaultConfig

func DefaultConfig() FleetConfig

type FleetTunnel

type FleetTunnel struct {
	FleetConfig
	// contains filtered or unexported fields
}

func NewTunnel

func NewTunnel(config FleetConfig) (*FleetTunnel, error)

func (*FleetTunnel) Cat

func (f *FleetTunnel) Cat(unitName string) (string, error)

func (*FleetTunnel) Destroy

func (f *FleetTunnel) Destroy(events chan Event, unitNames ...string) error

func (*FleetTunnel) List

func (f *FleetTunnel) List() ([]string, error)

func (*FleetTunnel) Start

func (f *FleetTunnel) Start(events chan Event, units UnitDataList) error

func (*FleetTunnel) Status

func (f *FleetTunnel) Status() (StatusMap, error)

func (*FleetTunnel) Stop

func (f *FleetTunnel) Stop(events chan Event, unitNames ...string) (StopStats, error)

type StatusMap

type StatusMap struct {
	// contains filtered or unexported fields
}

func (StatusMap) Get

func (s StatusMap) Get(unitName string) (string, bool)

type StopStats

type StopStats struct {
	StoppedUnits       int
	StoppedGlobalUnits int
}

type UnitData

type UnitData interface {
	Name() string
	Content() string
}

type UnitDataList

type UnitDataList interface {
	Len() int
	Get(index int) UnitData
}

Jump to

Keyboard shortcuts

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