executor

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

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 ExecResult

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

type Executor

type Executor interface {
	Exec(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 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(arg string, env interface{}) (ExecResult, error)

Jump to

Keyboard shortcuts

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