runner

package
v0.0.0-...-c0cbf50 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

type Input struct {
	Cmd     string
	Args    []string
	Env     map[string]string
	Secrets map[string]string
	WorkDir string
}

type Output

type Output struct {
	Data     []map[string]interface{} `json:"data"`
	WorkDir  string
	Logs     []string `json:"logs"`
	ErrLogs  []string `json:"err_logs"`
	ExitCode int      `json:"exit_code"`
}

type Runner

type Runner interface {
	Execute(input *Input, timeout time.Duration) (*Output, error)
}

type Subprocess

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

func NewSubprocess

func NewSubprocess(logger *logger.Autopilot) *Subprocess

func (*Subprocess) Execute

func (s *Subprocess) Execute(input *Input, timeout time.Duration) (*Output, error)

Jump to

Keyboard shortcuts

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