Versions in this module Expand all Collapse all v0 v0.1.0 Nov 7, 2026 Changes in this version + const ApiVersion010 + const CheckBufSize + const DetachSignal + const DriverHealthy + const Pre09TaskHandleVersion + var CgroupMountEmpty = "Cgroup mount point unavailable" + var DriverRequiresRootMessage = "Driver must run as root" + var DriverStatsNotImplemented = cstructs.DriverStatsNotImplemented + var ErrTaskNotFound = fmt.Errorf("task not found for given id") + var FSIsolationChroot = FSIsolation("chroot") + var FSIsolationImage = FSIsolation("image") + var FSIsolationNone = FSIsolation("none") + var HealthStateHealthy = HealthState("healthy") + var HealthStateUndetected = HealthState("undetected") + var HealthStateUnhealthy = HealthState("unhealthy") + var NetIsolationModeGroup = NetIsolationMode("group") + var NetIsolationModeHost = NetIsolationMode("host") + var NetIsolationModeNone = NetIsolationMode("none") + var NetIsolationModeTask = NetIsolationMode("task") + var NoCgroupMountMessage = "Failed to discover cgroup mount point" + func BytesToMB(bytes int64) int64 + func DeviceToProto(device *DeviceConfig) *proto.Device + func DevicesToProto(devices []*DeviceConfig) []*proto.Device + func MountToProto(mount *MountConfig) *proto.Mount + func MountsToProto(mounts []*MountConfig) []*proto.Mount + func NetworkIsolationSpecToProto(spec *NetworkIsolationSpec) *proto.NetworkIsolationSpec + func ResourcesToProto(r *Resources) *proto.Resources + func Serve(d DriverPlugin, logger hclog.Logger) + func TaskStatsToProto(stats *TaskResourceUsage) (*proto.TaskStats, error) + type Capabilities struct + DisableLogCollection bool + Exec bool + FSIsolation FSIsolation + MountConfigs MountConfigSupport + MustInitiateNetwork bool + NetIsolationModes []NetIsolationMode + RemoteTasks bool + SendSignals bool + func (c *Capabilities) HasNetIsolationMode(m NetIsolationMode) bool + type CpuStats = cstructs.CpuStats + type DNSConfig struct + Options []string + Searches []string + Servers []string + func (c *DNSConfig) Copy() *DNSConfig + type DeviceConfig struct + HostPath string + Permissions string + TaskPath string + func DeviceFromProto(device *proto.Device) *DeviceConfig + func DevicesFromProto(devices []*proto.Device) []*DeviceConfig + func (d *DeviceConfig) Copy() *DeviceConfig + type DriverExecTaskNotSupported struct + func (_ DriverExecTaskNotSupported) ExecTask(taskID string, cmd []string, timeout time.Duration) (*ExecTaskResult, error) + type DriverNetwork struct + AutoAdvertise bool + IP string + PortMap map[string]int + func (d *DriverNetwork) Advertise() bool + func (d *DriverNetwork) Copy() *DriverNetwork + func (d *DriverNetwork) Hash() []byte + type DriverNetworkManager interface + CreateNetwork func(allocID string, request *NetworkCreateRequest) (*NetworkIsolationSpec, bool, error) + DestroyNetwork func(allocID string, spec *NetworkIsolationSpec) error + type DriverPlugin interface + Capabilities func() (*Capabilities, error) + DestroyTask func(taskID string, force bool) error + ExecTask func(taskID string, cmd []string, timeout time.Duration) (*ExecTaskResult, error) + Fingerprint func(context.Context) (<-chan *Fingerprint, error) + InspectTask func(taskID string) (*TaskStatus, error) + RecoverTask func(*TaskHandle) error + SignalTask func(taskID string, signal string) error + StartTask func(*TaskConfig) (*TaskHandle, *DriverNetwork, error) + StopTask func(taskID string, timeout time.Duration, signal string) error + TaskConfigSchema func() (*hclspec.Spec, error) + TaskEvents func(context.Context) (<-chan *TaskEvent, error) + TaskStats func(ctx context.Context, taskID string, interval time.Duration) (<-chan *cstructs.TaskResourceUsage, error) + WaitTask func(ctx context.Context, taskID string) (<-chan *ExitResult, error) + type DriverSignalTaskNotSupported struct + func (DriverSignalTaskNotSupported) SignalTask(taskID, signal string) error + type ExecOptions struct + Command []string + ResizeCh <-chan TerminalSize + Stderr io.WriteCloser + Stdin io.ReadCloser + Stdout io.WriteCloser + Tty bool + func StreamToExecOptions(ctx context.Context, command []string, tty bool, stream ExecTaskStream) (*ExecOptions, <-chan error) + type ExecTaskResult struct + ExitResult *ExitResult + Stderr []byte + Stdout []byte + type ExecTaskStream interface + Recv func() (*ExecTaskStreamingRequestMsg, error) + Send func(*ExecTaskStreamingResponseMsg) error + type ExecTaskStreamingDriver interface + ExecTaskStreaming func(ctx context.Context, taskID string, execOptions *ExecOptions) (*ExitResult, error) + type ExecTaskStreamingRawDriver interface + ExecTaskStreamingRaw func(ctx context.Context, taskID string, command []string, tty bool, ...) error + type ExecTaskStreamingRequestMsg = proto.ExecTaskStreamingRequest + type ExecTaskStreamingResponseMsg = proto.ExecTaskStreamingResponse + func NewExecStreamingResponseExit(exitCode int) *ExecTaskStreamingResponseMsg + type ExitResult struct + Err error + ExitCode int + OOMKilled bool + Signal int + func (r *ExitResult) Copy() *ExitResult + func (r *ExitResult) Successful() bool + type FSIsolation string + type Fingerprint struct + Attributes map[string]*pstructs.Attribute + Err error + Health HealthState + HealthDescription string + type HealthState string + type HostsConfig struct + Address string + Hostname string + type InternalCapabilities struct + DisableLogCollection bool + DisableMetricsCollection bool + type InternalCapabilitiesDriver interface + InternalCapabilities func() InternalCapabilities + type LinuxResources struct + CPUPeriod int64 + CPUQuota int64 + CPUShares int64 + CpusetCgroupPath string + CpusetCpus string + MemoryLimitBytes int64 + OOMScoreAdj int64 + PercentTicks float64 + func (r *LinuxResources) Copy() *LinuxResources + type MemoryResources = structs.AllocatedMemoryResources + type MemoryStats = cstructs.MemoryStats + type MountConfig struct + HostPath string + PropagationMode string + Readonly bool + TaskPath string + func MountFromProto(mount *proto.Mount) *MountConfig + func MountsFromProto(mounts []*proto.Mount) []*MountConfig + func (m *MountConfig) Copy() *MountConfig + func (m *MountConfig) IsEqual(o *MountConfig) bool + type MountConfigSupport int32 + const MountConfigSupportAll + const MountConfigSupportNone + type NetIsolationMode string + type NetworkCreateRequest struct + Hostname string + type NetworkIsolationSpec struct + HostsConfig *HostsConfig + Labels map[string]string + Mode NetIsolationMode + Path string + func NetworkIsolationSpecFromProto(pb *proto.NetworkIsolationSpec) *NetworkIsolationSpec + type PluginDriver struct + func NewDriverPlugin(d DriverPlugin, logger hclog.Logger) *PluginDriver + func (p *PluginDriver) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) + func (p *PluginDriver) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error + type ResourceUsage = cstructs.ResourceUsage + type Resources struct + LinuxResources *LinuxResources + NomadResources *structs.AllocatedTaskResources + Ports *structs.AllocatedPorts + func ResourcesFromProto(pb *proto.Resources) *Resources + func (r *Resources) Copy() *Resources + type TaskConfig struct + AllocDir string + AllocID string + DNS *DNSConfig + DeviceEnv map[string]string + Devices []*DeviceConfig + Env map[string]string + ID string + JobID string + JobName string + Mounts []*MountConfig + Name string + Namespace string + NetworkIsolation *NetworkIsolationSpec + NodeID string + NodeName string + ParentJobID string + Resources *Resources + StderrPath string + StdoutPath string + TaskGroupName string + User string + func (tc *TaskConfig) Copy() *TaskConfig + func (tc *TaskConfig) DecodeDriverConfig(t interface{}) error + func (tc *TaskConfig) EncodeConcreteDriverConfig(t interface{}) error + func (tc *TaskConfig) EncodeDriverConfig(val cty.Value) error + func (tc *TaskConfig) EnvList() []string + func (tc *TaskConfig) TaskDir() *allocdir.TaskDir + type TaskEvent struct + AllocID string + Annotations map[string]string + Err error + Message string + TaskID string + TaskName string + Timestamp time.Time + type TaskHandle struct + Config *TaskConfig + DriverState []byte + State TaskState + Version int + func NewTaskHandle(version int) *TaskHandle + func NewTaskHandleFromState(ts *structs.TaskState) *TaskHandle + func (h *TaskHandle) Copy() *TaskHandle + func (h *TaskHandle) GetDriverState(v interface{}) error + func (h *TaskHandle) SetDriverState(v interface{}) error + func (h *TaskHandle) Store(ts *structs.TaskState) + type TaskResourceUsage = cstructs.TaskResourceUsage + func TaskStatsFromProto(pb *proto.TaskStats) (*TaskResourceUsage, error) + type TaskState string + const TaskStateExited + const TaskStateRunning + const TaskStateUnknown + type TaskStatus struct + CompletedAt time.Time + DriverAttributes map[string]string + ExitResult *ExitResult + ID string + Name string + NetworkOverride *DriverNetwork + StartedAt time.Time + State TaskState + type TerminalSize struct + Height int + Width int v0.1.0-preview.3 Nov 7, 2026 v0.1.0-preview.2 Nov 7, 2026 v0.1.0-preview.1 Nov 7, 2026