Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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
}
Click to show internal directories.
Click to hide internal directories.