Documentation ¶
Index ¶
- Variables
- type Action
- type Executor
- func (e *Executor) CombinedLog() string
- func (e *Executor) Context() context.Context
- func (e *Executor) Create(name string) (*os.File, error)
- func (e *Executor) Exec(cmd string, env, args []string) error
- func (e *Executor) Log() []fmt.Stringer
- func (e *Executor) Mkdir(name string) error
- func (e *Executor) Open(name string) (*os.File, error)
- func (e *Executor) OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func (e *Executor) Printf(format string, v ...interface{})
- func (e *Executor) Println(v ...interface{})
- func (e *Executor) Run(ctx context.Context, cmd string, args ...string) namespace.Cmd
- func (e *Executor) RunCmds() []*Run
- type Message
- type Run
Constants ¶
This section is empty.
Variables ¶
ErrNotFound is the error resulting if a path search failed to find an executable file.
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action interface is used for deferred actions that get performed during the build stage, unlike rules actions are NOT meant to be executed in parralel.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor defines the envinroment in which a target will be built, it provide helper functions for shelling out without having to worry about stdout or stderr outputs.
func New ¶
New initializes and returns a new executor.Executor
func (*Executor) Context ¶
Context returns the context that's attached to the Executor
func (*Executor) Create ¶
Create creates and returns a new file with the given name in the namespace
func (*Executor) Exec ¶
Exec executes a command writing it's outputs to the context
func (*Executor) Mkdir ¶
Mkdir creates a folder in the executor
func (*Executor) Open ¶
Open creates and returns a new file with the given name in the namespace
func (*Executor) OpenFile ¶
OpenFile creates and returns a new file with the given name, flags and mode in the namespace
func (*Executor) Printf ¶
Printf wraps sprintf for log items
func (*Executor) Println ¶
func (e *Executor) Println(v ...interface{})
Println wraps sprintf for log items
func (*Executor) Run ¶
Run executes a command writing it's outputs to the namespace