executor

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ignore

func Ignore(root string) error

func MkHash

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

func RunCommand

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

Types

type Execution

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

func DefaultExecution

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

func GetExecution

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

func (*Execution) Execute

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

func (*Execution) Flush

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

func (*Execution) IgnoreFile

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

type Metadata

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

type OutputWriter

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

func SuppressedCommand

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

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

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

func (Step) Run

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