scheduler

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 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 Cache

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

func NewCache

func NewCache(log logr.Logger, strategy CacheStrategy) *Cache

func (*Cache) AddContainer

func (c *Cache) AddContainer(node *v1alpha1.MachinePool)

func (*Cache) AddInstance

func (c *Cache) AddInstance(instance *v1alpha1.Machine) error

func (*Cache) AssumeInstance

func (c *Cache) AssumeInstance(instance *v1alpha1.Machine) error

func (*Cache) FinishBinding

func (c *Cache) FinishBinding(instance *v1alpha1.Machine) error

func (*Cache) ForgetInstance

func (c *Cache) ForgetInstance(instance *v1alpha1.Machine) error

func (*Cache) IsAssumedInstance

func (c *Cache) IsAssumedInstance(instance *v1alpha1.Machine) (bool, error)

func (*Cache) RemoveContainer

func (c *Cache) RemoveContainer(node *v1alpha1.MachinePool) error

func (*Cache) RemoveInstance

func (c *Cache) RemoveInstance(instance *v1alpha1.Machine) error

func (*Cache) Snapshot

func (c *Cache) Snapshot() *Snapshot

func (*Cache) Start

func (c *Cache) Start(ctx context.Context) error

func (*Cache) UpdateContainer

func (c *Cache) UpdateContainer(_, newNode *v1alpha1.MachinePool)

func (*Cache) UpdateInstance

func (c *Cache) UpdateInstance(oldInstance, newInstance *v1alpha1.Machine) error

type CacheStrategy

type CacheStrategy interface {
	Key(instance *v1alpha1.Machine) (types.UID, error)
	ContainerKey(instance *v1alpha1.Machine) string
}
var DefaultCacheStrategy CacheStrategy = defaultCacheStrategy{}

type ContainerInfo

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

func (*ContainerInfo) MaxAllocatable

func (n *ContainerInfo) MaxAllocatable(className string) int64

func (*ContainerInfo) Node

func (n *ContainerInfo) Node() *v1alpha1.MachinePool

func (*ContainerInfo) NumInstances

func (n *ContainerInfo) NumInstances() int

type InstanceInfo

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

type Snapshot

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

func (*Snapshot) GetNode

func (s *Snapshot) GetNode(name string) (*ContainerInfo, error)

func (*Snapshot) ListNodes

func (s *Snapshot) ListNodes() []*ContainerInfo

func (*Snapshot) NumNodes

func (s *Snapshot) NumNodes() int

func (*Snapshot) Update

func (s *Snapshot) Update()

Jump to

Keyboard shortcuts

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