invokers

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BLANK string = ""
View Source
const DEFAULT_COMMAND string = "opwire-agent-default"

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandDescriptor

type CommandDescriptor struct {
	CommandString string
	// contains filtered or unexported fields
}

type CommandEntrypoint

type CommandEntrypoint struct {
	Default *CommandDescriptor
	Method  map[string]*CommandDescriptor
}

type CommandInvocation

type CommandInvocation struct {
	Action           string
	CommandString    string
	Name             string
	Envs             []string
	ExecutionTimeout time.Duration
}

type ExecutionState

type ExecutionState struct {
	IsTimeout bool
	Duration  time.Duration
}

type Executor

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

func NewExecutor

func NewExecutor(opts *ExecutorOptions) (*Executor, error)

func (*Executor) Register

func (e *Executor) Register(descriptor *CommandDescriptor, names ...string) error

func (*Executor) Run

func (*Executor) RunOnRawData

func (e *Executor) RunOnRawData(opts *CommandInvocation, inData []byte) ([]byte, []byte, *ExecutionState, error)

type ExecutorOptions

type ExecutorOptions struct {
	Command CommandDescriptor
}

type PipeChain

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

func (*PipeChain) Run

func (p *PipeChain) Run(ib *bytes.Buffer, ob *bytes.Buffer, eb *bytes.Buffer, chain ...*exec.Cmd) (err error)

func (*PipeChain) Stop

func (p *PipeChain) Stop()

Jump to

Keyboard shortcuts

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