helpers

package
v1.13.1-1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsgName

func AsgName(sess *session.Session) (*string, error)

func AtomicWrite

func AtomicWrite(path string, contents []byte, mode os.FileMode) error

func EnsureEnvironment

func EnsureEnvironment(environment []string) (map[string]string, error)

func IdempotentDo

func IdempotentDo(checker func() (bool, error), doer func() error) error

func InputToMapping

func InputToMapping(inputFile string) (map[string]string, error)

func IsIndexOne

func IsIndexOne(sess *session.Session, inputFile string) (bool, error)

func MapKeys

func MapKeys(mapping map[string]string) []string

func MyID

func MyID(sess *session.Session) (string, error)

func MyIP

func MyIP(sess *session.Session) (string, error)

func MyIndex

func MyIndex(mapping map[string]string, ip string) string

func SortMapKeys

func SortMapKeys(mapping map[string]string) []string

func WaitFor

func WaitFor(duration time.Duration, checker func() error) error

func WriteIfChanged

func WriteIfChanged(path string, contents []byte, mode os.FileMode) error

Types

type CommandOutput

type CommandOutput struct {
	ExitStatus int
	Stdout     string
	Stderr     string
}

func RunCommand

func RunCommand(command string, args ...string) *CommandOutput

Jump to

Keyboard shortcuts

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