internal

package
v0.0.0-...-8109336 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PluginName    = "env-instance-task-driver"
	PluginVersion = "0.2.0"
)

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(logger hclog.Logger) drivers.DriverPlugin

Types

type DriverExtra

type DriverExtra struct {
	// contains filtered or unexported fields
}

func (*DriverExtra) DestroyTask

func (de *DriverExtra) DestroyTask(
	driverCtx context.Context,
	tracer trace.Tracer,
	_ hclog.Logger,
	tasks *driver.TaskStore[*driver.TaskHandle[*extraTaskHandle]],
	taskID string,
	force bool,
) error

func (*DriverExtra) StartTask

func (de *DriverExtra) StartTask(
	driverCtx context.Context,
	tracer trace.Tracer,
	logger hclog.Logger,
	cfg *drivers.TaskConfig,
	tasks *driver.TaskStore[*driver.TaskHandle[*extraTaskHandle]],
) (*drivers.TaskHandle, *drivers.DriverNetwork, error)

func (*DriverExtra) StopTask

func (de *DriverExtra) StopTask(
	driverCtx context.Context,
	tracer trace.Tracer,
	_ hclog.Logger,
	tasks *driver.TaskStore[*driver.TaskHandle[*extraTaskHandle]],
	taskID string,
	timeout time.Duration,
	signal string,
) error

func (*DriverExtra) TaskStats

func (de *DriverExtra) TaskStats(
	ctx,
	driverCtx context.Context,
	tracer trace.Tracer,
	_ hclog.Logger,
	tasks *driver.TaskStore[*driver.TaskHandle[*extraTaskHandle]],
	taskID string,
	interval time.Duration,
) (<-chan *structs.TaskResourceUsage, error)

func (*DriverExtra) WaitTask

func (de *DriverExtra) WaitTask(
	ctx,
	driverCtx context.Context,
	tracer trace.Tracer,
	_ hclog.Logger,
	tasks *driver.TaskStore[*driver.TaskHandle[*extraTaskHandle]],
	taskID string,
) (<-chan *drivers.ExitResult, error)

type TaskConfig

type TaskConfig struct {
	InstanceID string `codec:"InstanceID"`
	EnvID      string `codec:"EnvID"`

	KernelVersion      string `codec:"KernelVersion"`
	FirecrackerVersion string `codec:"FirecrackerVersion"`

	HugePages bool `codec:"HugePages"`

	TeamID string `codec:"TeamID"`

	TraceID string `codec:"TraceID"`
	SpanID  string `codec:"SpanID"`

	LogsProxyAddress string `codec:"LogsProxyAddress"`

	ConsulToken string `codec:"ConsulToken"`
}

type TaskState

type TaskState struct {
	TaskConfig *drivers.TaskConfig
	StartedAt  time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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