{"modulePath":"github.com/Ensono/taskctl","version":"v1.7.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package executor\n\npackage executor\n\nIt uses the mvdan.sh shell implementation in Go. injects a custom environment per execution\n\nnot all \\*nix\\* commands are available, should only be used for a limited number of scenarios\n\n## Functions\n\n```go\nfunc IsExitStatus(err error) (uint8, bool)\n```\nIsExitStatus checks if given \\`err\\` is an exit status\n\n## Types\n\n```go\ntype DefaultExecutor struct {\n\t// contains filtered or unexported fields\n}\n```\nDefaultExecutor is a default executor used for jobs Uses \\`mvdan.cc/sh/v3/interp\\` under the hood\n\n```go\nfunc NewDefaultExecutor(stdin io.Reader, stdout, stderr io.Writer) (*DefaultExecutor, error)\n```\nNewDefaultExecutor creates new default executor\n\n```go\nfunc (e *DefaultExecutor) Execute(ctx context.Context, job *Job) ([]byte, error)\n```\nExecute executes given job with provided context Returns job output\n\n```go\nfunc (e *DefaultExecutor) WithReset(doReset bool) *DefaultExecutor\n```\n\n```go\ntype Executor interface {\n\tExecute(context.Context, *Job) ([]byte, error)\n}\n```\nExecutor executes given job\n\n```go\ntype Job struct {\n\tCommand string\n\tDir     string\n\tEnv     variables.Container\n\tVars    variables.Container\n\tTimeout *time.Duration\n\n\tStdout, Stderr io.Writer\n\tStdin          io.Reader\n\n\tNext *Job\n}\n```\nJob is a linked list of jobs to execute by Executor\n\n```go\nfunc NewJobFromCommand(command string) *Job\n```\nNewJobFromCommand creates new Job instance from given command\n\n","path":"github.com/Ensono/taskctl/pkg/executor","name":"executor","synopsis":"package executor","isRedistributable":true}
