Documentation
¶
Index ¶
- func NewWorkerController(deviceController framework.DeviceController, ...) framework.WorkerController
- type AllocationController
- func (a *AllocationController) AllocateWorkerDevices(request *api.WorkerInfo) (*api.WorkerAllocation, error)
- func (a *AllocationController) DeallocateWorker(workerUID string) error
- func (a *AllocationController) GetDeviceAllocations() map[string][]*api.WorkerAllocation
- func (a *AllocationController) GetWorkerAllocation(workerUID string) (*api.WorkerAllocation, bool)
- type WorkerController
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
Click to show internal directories.
Click to hide internal directories.