hello

package
v0.0.0-...-70c2e52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2021 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 Config

type Config struct {
}

type TaskConfig

type TaskConfig struct {
	Iface      string `codec:"interface"`
	Mac_adress string `codec:"mac_address"`
}

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

StartTask returns a task handle and a driver network if necessary.

func (*WolDriverPlugin) StopTask

func (d *WolDriverPlugin) StopTask(taskID string, timeout time.Duration, signal string) error

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

func (d *WolDriverPlugin) TaskEvents(ctx context.Context) (<-chan *drivers.TaskEvent, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL