package namedresources
import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources"
Index ¶
- func AddAllocation(m *Model, result *resourceapi.NamedResourcesAllocationResult)
- func AddResources(m *Model, resources *resourceapi.NamedResourcesResources)
- type Controller
- func NewClaimController(filter *resourceapi.NamedResourcesFilter, requests []*resourceapi.NamedResourcesRequest) (*Controller, error)
- func (c *Controller) Allocate(ctx context.Context, model Model) ([]*resourceapi.NamedResourcesAllocationResult, error)
- func (c *Controller) NodeIsSuitable(ctx context.Context, model Model) (bool, error)
- type InstanceAllocation
- type Model
Functions ¶
func AddAllocation ¶
func AddAllocation(m *Model, result *resourceapi.NamedResourcesAllocationResult)
AddAllocation may get called after AddResources to mark some resource instances as allocated. The result parameter may be nil.
func AddResources ¶
func AddResources(m *Model, resources *resourceapi.NamedResourcesResources)
AddResources must be called first to create entries for all existing resource instances. The resources parameter may be nil.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewClaimController ¶
func NewClaimController(filter *resourceapi.NamedResourcesFilter, requests []*resourceapi.NamedResourcesRequest) (*Controller, error)
func (*Controller) Allocate ¶
func (c *Controller) Allocate(ctx context.Context, model Model) ([]*resourceapi.NamedResourcesAllocationResult, error)
func (*Controller) NodeIsSuitable ¶
type InstanceAllocation ¶
type InstanceAllocation struct { Allocated bool Instance *resourceapi.NamedResourcesInstance }
type Model ¶
type Model struct { Instances []InstanceAllocation }
Source Files ¶
namedresourcesmodel.go
- Version
- v1.30.14
- Published
- Jun 17, 2025
- Platform
- darwin/amd64
- Imports
- 7 packages
- Last checked
- 4 minutes ago –
Tools for package owners.