namedresources

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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 (*Controller) Allocate

func (*Controller) NodeIsSuitable

func (c *Controller) NodeIsSuitable(ctx context.Context, model Model) (bool, error)

type InstanceAllocation

type InstanceAllocation struct {
	Allocated bool
	Instance  *resourceapi.NamedResourcesInstance
}

type Model

type Model struct {
	Instances []InstanceAllocation
}

Jump to

Keyboard shortcuts

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