harness

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCmd

func DefaultCmd() []string

func DefaultEntrypoint

func DefaultEntrypoint() []string

Types

type Command

type Command struct {
	Args       string
	WorkingDir string
	Env        map[string]string
	Stdout     io.Writer
	Stderr     io.Writer
}

type Harness

type Harness interface {
	Create(context.Context) error
	Destroy(context.Context) error
	Run(context.Context, Command) error
}

type Stack

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

Stack is a lifo queue used to easily manage resources that need to be torn down by harnesses. It is a LIFO queue, so the first item added is the last item torn down.

func NewStack

func NewStack() *Stack

func (*Stack) Add

func (r *Stack) Add(f func(ctx context.Context) error) error

func (*Stack) Teardown

func (r *Stack) Teardown(ctx context.Context) error

Directories

Path Synopsis
Package pterraform provides a harness that runs arbitrary terraform on a given path.
Package pterraform provides a harness that runs arbitrary terraform on a given path.

Jump to

Keyboard shortcuts

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