worker

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWorkerController

func NewWorkerController(
	deviceController framework.DeviceController,
	allocationController framework.WorkerAllocationController,
	mode api.IsolationMode,
	backend framework.Backend,
) framework.WorkerController

Types

type AllocationController

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

AllocationController manages worker device allocations This is a shared dependency between DeviceController, WorkerController, and Backend

func NewAllocationController

func NewAllocationController(deviceController framework.DeviceController) *AllocationController

NewAllocationController creates a new AllocationController

func (*AllocationController) AllocateWorkerDevices

func (a *AllocationController) AllocateWorkerDevices(request *api.WorkerInfo) (*api.WorkerAllocation, error)

AllocateWorkerDevices allocates devices for a worker request

func (*AllocationController) DeallocateWorker

func (a *AllocationController) DeallocateWorker(workerUID string) error

DeallocateWorker deallocates devices for a worker

func (*AllocationController) GetDeviceAllocations

func (a *AllocationController) GetDeviceAllocations() map[string][]*api.WorkerAllocation

GetDeviceAllocations returns all device allocations keyed by device UUID

func (*AllocationController) GetWorkerAllocation

func (a *AllocationController) GetWorkerAllocation(workerUID string) (*api.WorkerAllocation, bool)

GetWorkerAllocation returns the allocation for a specific worker

type WorkerController

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

func (*WorkerController) GetWorkerMetrics

func (w *WorkerController) GetWorkerMetrics() (map[string]map[string]map[string]*api.WorkerMetrics, error)

GetWorkerMetrics returns current worker metrics for all workers Returns map keyed by device UUID, then by worker UID, then by process ID

func (*WorkerController) ListWorkers

func (w *WorkerController) ListWorkers() ([]*api.WorkerInfo, error)

func (*WorkerController) Start

func (w *WorkerController) Start() error

func (*WorkerController) Stop

func (w *WorkerController) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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