Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockingDriver ¶
type BlockingDriver struct{}
BlockingDriver executes requests one-at-a-time
func (BlockingDriver) Run ¶
func (bd BlockingDriver) Run(request *ExecRequest) (ExecResult, error)
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder reads data via protocol.Reader, gob decodes the payload, and returns the result
func WrapDecoder ¶
WrapDecoder configures a Decoder and Reader instance around a base io.Reader
func (Decoder) DecodeRequest ¶
func (d Decoder) DecodeRequest(request *ExecRequest) error
DecodeRequest reads and decodes ExecRequests
func (Decoder) DecodeResult ¶
func (d Decoder) DecodeResult(result *ExecResult) error
DecodeResult reads and decodes ExecResults
type Driver ¶
type Driver interface {
Run(*ExecRequest) (ExecResult, error)
}
Driver is the command execution interface
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder takes arbitrary Go data, gob encodes it, and uses protocol.Writer to write the resulting data
func WrapEncoder ¶
Encoder configures an Encoder and Writer instance around a base io.Writer
func (Encoder) EncodeRequest ¶
func (e Encoder) EncodeRequest(request *ExecRequest) error
EncodeRequest encodes ExecRequests and writes them to the underlying transport via protocol.Writer
func (Encoder) EncodeResult ¶
func (e Encoder) EncodeResult(result *ExecResult) error
EncodeResult encodes ExecResults and writes them to the underlying transport via protcol.Writer
type ExecRequest ¶
func NewExecRequest ¶
func NewExecRequest() *ExecRequest
func (*ExecRequest) ToExecCommand ¶
func (er *ExecRequest) ToExecCommand() exec.Cmd
ToExecCommand builds a Go os/exec.Cmd from a source ExecRequest