internal

package
v0.0.0-...-dcd6d33 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 20 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-build-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(
	_ context.Context,
	_ 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(
	_ context.Context,
	_ 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,
	_ trace.Tracer,
	_ hclog.Logger,
	tasks *driver.TaskStore[*driver.TaskHandle[*extraTaskHandle]],
	taskID string,
) (<-chan *drivers.ExitResult, error)

type TaskConfig

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

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

	HugePages bool `codec:"HugePages"`

	StartCmd string `codec:"StartCmd"`

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

	VCpuCount  int64 `codec:"VCpuCount"`
	MemoryMB   int64 `codec:"MemoryMB"`
	DiskSizeMB int64 `codec:"DiskSizeMB"`
}

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