util

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2014 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveToSingleStates added in v0.8.0

func ActiveToSingleStates(active map[string][]UnitState) (map[string]UnitState, error)

ActiveToSingleStates takes a map of active states (such as that returned by WaitForNActiveUnits) and ensures that each unit has at most a single active state. It returns a mapping of unit name to a single UnitState.

func RunFleetctl

func RunFleetctl(args ...string) (string, string, error)

func RunFleetctlWithInput

func RunFleetctlWithInput(input string, args ...string) (string, string, error)

func TempUnit

func TempUnit(contents string) (string, error)

tempUnit creates a local unit file with the given contents, returning the name of the file

Types

type UnitState

type UnitState struct {
	Name        string
	ActiveState string
	Machine     string
	IP          string
}

func FilterActiveUnits added in v0.9.0

func FilterActiveUnits(states []UnitState) (filtered []UnitState)

func ParseUnitStates added in v0.9.0

func ParseUnitStates(units []string) (states []UnitState)

Jump to

Keyboard shortcuts

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