Documentation ¶
Overview ¶
Package execution provides an abstraction for a single execution of a command with the context of daemonservice.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrShuttingDown is returned once an execution has started shutting down and // is no longer accepting messages. ErrShuttingDown = errors.New("shutting down") )
Functions ¶
This section is empty.
Types ¶
type Execution ¶
An Execution represents a specific execution of a daemonservice.
func New ¶
func New(ctx context.Context, daemonServiceName string, cfg *dspb.Config, sc service.Context) (*Execution, error)
New creates and starts an execution of the command described in cfg. Messages received from the resulting process are passed to sc, as are StdOutput and ResourceUsage messages.
The context needs to be valid for the lifetime of the whole process execution!
func (*Execution) LastActive ¶
LastActive returns the last time that a message was sent or received, to the nearest second.
Click to show internal directories.
Click to hide internal directories.