executor

package
v3.1.3-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: GPL-3.0 Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExecutionimeout = errors.New("execution timeout")
	ErrRestNotOk       = errors.New("rest return non 2XX response")
)

Functions

This section is empty.

Types

type DockerExec

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

func NewDockerExec

func NewDockerExec(image string, timeout time.Duration) *DockerExec

func (*DockerExec) Exec

func (e *DockerExec) Exec(code []byte, arg string, env interface{}) (ExecResult, error)

type ExecResult

type ExecResult struct {
	Output  []byte
	Code    uint32
	Version string
}

type Executor

type Executor interface {
	Exec(exec []byte, arg string, env interface{}) (ExecResult, error)
}

func NewExecutor

func NewExecutor(executor string) (exec Executor, err error)

NewExecutor returns executor by name and executor URL

type MultiError

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

MultiError encapsulates error messages from the underlying executors into one error.

func (*MultiError) Error

func (e *MultiError) Error() string

Error implements error interface for MultiError by returning all error messages concatenated.

type MultiExec

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

MultiExec is a higher-order executor that utilizes the underlying executors to perform Exec.

func NewMultiExec

func NewMultiExec(execs []Executor, strategy string) (*MultiExec, error)

NewMultiExec creates a new MultiExec instance.

func (*MultiExec) Exec

func (e *MultiExec) Exec(code []byte, arg string, env interface{}) (ExecResult, error)

Exec implements Executor interface for MultiExec.

type RestExec

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

func NewRestExec

func NewRestExec(url string, timeout time.Duration) *RestExec

func (*RestExec) Exec

func (e *RestExec) Exec(code []byte, arg string, env interface{}) (ExecResult, error)

Jump to

Keyboard shortcuts

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