runner

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Executor executor.Interface
	Prefix   string
	OS       kubeoneapi.OperatingSystemName
	Verbose  bool
}

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

func (*Runner) NewFS added in v1.3.0

func (r *Runner) NewFS() executor.MkdirFS

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

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

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