Documentation ¶
Overview ¶
Package shell provides a 'cmd' channel type.
This package almost should be called 'cmd', but tends to have a special meaning in Go.
Index ¶
- func NewCmdChan(ctx *dsl.Ctx, cfg interface{}) (dsl.Chan, error)
- type CmdChan
- func (c *CmdChan) Close(ctx *dsl.Ctx) error
- func (c *CmdChan) DocSpec() *dsl.DocSpec
- func (c *CmdChan) Kill(ctx *dsl.Ctx) error
- func (c *CmdChan) Kind() dsl.ChanKind
- func (c *CmdChan) Open(ctx *dsl.Ctx) error
- func (c *CmdChan) Pub(ctx *dsl.Ctx, m dsl.Msg) error
- func (c *CmdChan) Recv(ctx *dsl.Ctx) chan dsl.Msg
- func (c *CmdChan) Sub(ctx *dsl.Ctx, topic string) error
- func (c *CmdChan) To(ctx *dsl.Ctx, m dsl.Msg) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CmdChan ¶
type CmdChan struct {
// contains filtered or unexported fields
}
CmdChan is a channel that's backed by a subprocess.
This channel forwards messages to a shell's stdin, and messages written to the shell's stdout and stderr are emitted.
func (*CmdChan) Kill ¶
Kill is not currently supported. (It should be.)
ToDo: Terminate the subprocess ungracefully.
func (*CmdChan) Pub ¶
Pub sends the given message payload to the subprocess's stdin.
The topic is ignored.
Click to show internal directories.
Click to hide internal directories.