step

package
v28.4.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execution

type Execution struct {
	Command string
	Args    []string
}

type Option

type Option func(*Step)

func Env

func Env(e ...string) Option

func Exec

func Exec(command string, args ...string) Option

func InExec

func InExec(hook func() error) Option

func PostExec

func PostExec(hook func(exitErr error) error) Option

func PreExec

func PreExec(hook func() error) Option

func Stderr

func Stderr(w io.Writer) Option

func Stdin

func Stdin(r io.Reader) Option

func Stdout

func Stdout(w io.Writer) Option

func Workdir

func Workdir(path string) Option

func Write

func Write(data []byte) Option

type Options

type Options []Option

func NewOptions

func NewOptions() Options

func (Options) Add

func (o Options) Add(options ...Option) Options

type Step

type Step struct {
	Exec      Execution
	PreExec   func() error
	InExec    func() error
	PostExecs []func(error) error
	Stdout    io.Writer
	Stderr    io.Writer
	Stdin     io.Reader
	Workdir   string
	Env       []string
	WriteData []byte
}

func New

func New(options ...Option) *Step

type Steps

type Steps []*Step

func NewSteps

func NewSteps(steps ...*Step) Steps

func (*Steps) Add

func (s *Steps) Add(steps ...*Step) Steps

Jump to

Keyboard shortcuts

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