allocator

package
v0.1.0-latest-stable Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 12 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocateResult

type AllocateResult = types.NamespacedName

type Allocator

type Allocator interface {
	// Allocate allocates a DPUCluster for DPU
	Allocate(context.Context, *provisioningv1.DPU) (AllocateResult, error)
	// SaveAssignedDPU stores assigned DPU to cache
	SaveAssignedDPU(*provisioningv1.DPU)
	// SaveCluster updates cached DPUCluster with the given one
	SaveCluster(*provisioningv1.DPUCluster)
	// ReleaseDPU releases the given DPU from its allocated DPUCluster
	ReleaseDPU(*provisioningv1.DPU)
	// RemoveCluster removes given DPUCluster from cache
	RemoveCluster(dc *provisioningv1.DPUCluster)
	// GetDPUsCount returns the number of assigned DPUs to the given DPUCluster
	GetDPUsCount(dc *provisioningv1.DPUCluster) int
}

func NewAllocator

func NewAllocator(client client.Client) Allocator

type ClusterCache

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

ClusterCache caches DPUClusters and to which DPUs they are allocated.

type ClusterInfo

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

Jump to

Keyboard shortcuts

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