Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exec ¶
type Exec interface {
// Name returns the name of the launcher. This is used to identify
// which launcher to use in configurations or command line flags
Name() string
// Exec starts the plugin given the name of the plugin and
// the command and args to start it.
// This can be an async process but the launcher will poll for the running
// status of the plugin.
// The client can receive and block on the returned channel
// and add optional timeout in its own select statement.
Exec(name string, config *types.Any) (<-chan error, error)
}
Exec is a service that is able to start plugins based on different mechanisms from running local binary to pulling and running docker containers or engine plugins
func NewNoOpExec ¶
func NewNoOpExec() Exec
NewNoOpExec doesn't actually launch the plugins. It's a stub with no op and relies on manual plugin starts.
type ExecRule ¶
type ExecRule struct {
// Exec is the name of the exec to use to start the plugin
Exec string
// Properties is the properties for the executor
Properties *types.Any
}
ExecRule encapsulates what's required to exec a plugin
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor runs continuously receiving requests to start a plugin. Monitor uses a launcher to actually start the process of the plugin.
func NewMonitor ¶
NewMonitor returns a monitor that continuously watches for input requests and launches the process for the plugin, if not already running.
func (*Monitor) Start ¶
func (m *Monitor) Start() (chan<- StartPlugin, error)
Start starts the monitor and returns a channel for sending requests to launch plugins. Closing the channel effectively stops the monitor loop.