executor

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ignore added in v0.8.1

func Ignore(root string) error

func MkHash added in v0.8.1

func MkHash(root string, ignore []string) (string, error)

func RunCommand added in v0.8.1

func RunCommand(cmd *exec.Cmd, output *OutputWriter) (err error)

Types

type Execution added in v0.8.1

type Execution struct {
	Metadata Metadata `hcl:"metadata"`
	Steps    []*Step  `hcl:"step"`
}

func DefaultExecution added in v0.8.1

func DefaultExecution(path string, prev *Execution) (e *Execution)

func GetExecution added in v0.8.1

func GetExecution(path, name string) (*Execution, error)

func (*Execution) Execute added in v0.8.1

func (e *Execution) Execute(actionName string, verbose bool) error

func (*Execution) Flush added in v0.8.1

func (e *Execution) Flush(root string) error

func (*Execution) IgnoreFile added in v0.8.1

func (e *Execution) IgnoreFile(root string) ([]string, error)

type Metadata added in v0.8.1

type Metadata struct {
	Path string `hcl:"path"`
	Name string `hcl:"name"`
}

type OutputWriter

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

func SuppressedCommand added in v0.8.1

func SuppressedCommand(command string, args ...string) (cmd *exec.Cmd, output *OutputWriter)

func (*OutputWriter) Close

func (out *OutputWriter) Close() error

func (*OutputWriter) Format

func (out *OutputWriter) Format() string

func (*OutputWriter) Write

func (out *OutputWriter) Write(line []byte) (int, error)

type Step added in v0.8.1

type Step struct {
	Name    string   `hcl:",key"`
	Wkdir   string   `hcl:"wkdir"`
	Target  string   `hcl:"target"`
	Command string   `hcl:"command"`
	Args    []string `hcl:"args"`
	Sha     string   `hcl:"sha"`
	Retries int      `hcl:"retries"`
	Verbose bool     `hcl:"verbose"`
}

func (Step) Execute added in v0.8.1

func (step Step) Execute(root string, ignore []string) (string, error)

func (Step) Run added in v0.8.1

func (step Step) Run(root string) error

type WrappedError

type WrappedError struct {
	Output string
	// contains filtered or unexported fields
}

func (*WrappedError) Error

func (we *WrappedError) Error() string

Jump to

Keyboard shortcuts

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