driver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	StartTask(task *Task) (*proto.TaskHandle, error)
	RecoverTask(taskID string, task *proto.TaskHandle) error
	WaitTask(ctx context.Context, taskID string) (<-chan *proto.ExitResult, error)
	StopTask(taskID string, timeout time.Duration) error
	DestroyTask(taskID string, force bool) error
	CreateNetwork(allocID string, hostname string) (*proto.NetworkSpec, bool, error)
	DestroyNetwork(spec *proto.NetworkSpec) error
	ExecTask(taskID string, cmd []string) (*ExecTaskResult, error)
}

type ExecTaskResult

type ExecTaskResult struct {
	Stdout   []byte
	Stderr   []byte
	ExitCode uint64
}

type MountConfig

type MountConfig struct {
	TaskPath string
	HostPath string
}

type Task

type Task struct {
	Id string

	AllocID string

	Network *proto.NetworkSpec

	Mounts []*MountConfig

	*proto.Task
}

Jump to

Keyboard shortcuts

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