Documentation
¶
Index ¶
- func NewPlugin(logger hclog.Logger) drivers.DriverPlugin
- type Config
- type TaskConfig
- type TaskState
- type WolDriverPlugin
- func (d *WolDriverPlugin) Capabilities() (*drivers.Capabilities, error)
- func (d *WolDriverPlugin) ConfigSchema() (*hclspec.Spec, error)
- func (d *WolDriverPlugin) DestroyTask(taskID string, force bool) error
- func (d *WolDriverPlugin) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error)
- func (d *WolDriverPlugin) InspectTask(taskID string) (*drivers.TaskStatus, error)
- func (d *WolDriverPlugin) PluginInfo() (*base.PluginInfoResponse, error)
- func (d *WolDriverPlugin) RecoverTask(handle *drivers.TaskHandle) error
- func (d *WolDriverPlugin) SetConfig(cfg *base.Config) error
- func (d *WolDriverPlugin) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drivers.DriverNetwork, error)
- func (d *WolDriverPlugin) StopTask(taskID string, timeout time.Duration, signal string) error
- func (d *WolDriverPlugin) TaskConfigSchema() (*hclspec.Spec, error)
- func (d *WolDriverPlugin) TaskEvents(ctx context.Context) (<-chan *drivers.TaskEvent, error)
- func (d *WolDriverPlugin) TaskStats(ctx context.Context, taskID string, interval time.Duration) (<-chan *drivers.TaskResourceUsage, error)
- func (d *WolDriverPlugin) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPlugin ¶
func NewPlugin(logger hclog.Logger) drivers.DriverPlugin
NewPlugin returns a new example driver plugin
Types ¶
type TaskConfig ¶
type TaskState ¶
type TaskState struct { ReattachConfig *structs.ReattachConfig TaskConfig *drivers.TaskConfig StartedAt time.Time Iface string Mac_adress string }
type WolDriverPlugin ¶
type WolDriverPlugin struct {
// contains filtered or unexported fields
}
func (*WolDriverPlugin) Capabilities ¶
func (d *WolDriverPlugin) Capabilities() (*drivers.Capabilities, error)
func (*WolDriverPlugin) ConfigSchema ¶
func (d *WolDriverPlugin) ConfigSchema() (*hclspec.Spec, error)
ConfigSchema returns the plugin configuration schema.
func (*WolDriverPlugin) DestroyTask ¶
func (d *WolDriverPlugin) DestroyTask(taskID string, force bool) error
DestroyTask cleans up and removes a task that has terminated.
func (*WolDriverPlugin) Fingerprint ¶
func (d *WolDriverPlugin) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error)
Fingerprint returns a channel that will be used to send health information and other driver specific node attributes.
func (*WolDriverPlugin) InspectTask ¶
func (d *WolDriverPlugin) InspectTask(taskID string) (*drivers.TaskStatus, error)
InspectTask returns detailed status information for the referenced taskID.
func (*WolDriverPlugin) PluginInfo ¶
func (d *WolDriverPlugin) PluginInfo() (*base.PluginInfoResponse, error)
PluginInfo returns information describing the plugin.
func (*WolDriverPlugin) RecoverTask ¶
func (d *WolDriverPlugin) RecoverTask(handle *drivers.TaskHandle) error
RecoverTask recreates the in-memory state of a task from a TaskHandle.
func (*WolDriverPlugin) SetConfig ¶
func (d *WolDriverPlugin) SetConfig(cfg *base.Config) error
SetConfig is called by the client to pass the configuration for the plugin.
func (*WolDriverPlugin) StartTask ¶
func (d *WolDriverPlugin) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drivers.DriverNetwork, error)
StartTask returns a task handle and a driver network if necessary.
func (*WolDriverPlugin) StopTask ¶
StopTask stops a running task with the given signal and within the timeout window.
func (*WolDriverPlugin) TaskConfigSchema ¶
func (d *WolDriverPlugin) TaskConfigSchema() (*hclspec.Spec, error)
func (*WolDriverPlugin) TaskEvents ¶
TaskEvents returns a channel that the plugin can use to emit task related events.
func (*WolDriverPlugin) TaskStats ¶
func (d *WolDriverPlugin) TaskStats(ctx context.Context, taskID string, interval time.Duration) (<-chan *drivers.TaskResourceUsage, error)
TaskStats returns a channel which the driver should send stats to at the given interval.
func (*WolDriverPlugin) WaitTask ¶
func (d *WolDriverPlugin) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error)
WaitTask returns a channel used to notify Nomad when a task exits.