runner

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunning

func IsRunning(stdout string) bool

IsRunning checks if the given output represents the "Running" status of a Kubernetes pod.

Types

type Runner

type Runner struct {
	Conn    ssh.Connection
	Prefix  string
	OS      string
	Verbose bool
}

Runner bundles a connection to a host with the verbosity and other options for running commands via SSH.

func (*Runner) Run

func (r *Runner) Run(cmd string, variables TemplateVariables) (string, string, error)

Run executes a given command/script, optionally printing its output to stdout/stderr.

func (*Runner) RunRaw added in v0.11.0

func (r *Runner) RunRaw(cmd string) (string, string, error)

func (*Runner) WaitForCondition

func (r *Runner) WaitForCondition(cmd string, timeout time.Duration, validator validatorFunc) bool

WaitForCondition waits for something to be true.

func (*Runner) WaitForPod

func (r *Runner) WaitForPod(namespace string, name string, timeout time.Duration) error

WaitForPod waits for the availability of the given Kubernetes element.

type Tee

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

Tee mimics the unix `tee` command by piping its input through to the upstream writer and also capturing it in a buffer.

func NewTee

func NewTee(wc io.WriteCloser) *Tee

NewTee constructor

func (*Tee) Close

func (t *Tee) Close() error

Close underlying io.Closer

func (*Tee) String

func (t *Tee) String() string

func (*Tee) Write

func (t *Tee) Write(p []byte) (int, error)

type TemplateVariables

type TemplateVariables map[string]interface{}

TemplateVariables is a render context for templates

Jump to

Keyboard shortcuts

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