store

package
v0.0.0-...-bc30bd0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStore

type BaseStore interface {
	commoncache.ClusterEventsHandler
	AssumePod(*framework.CachePodInfo) error
	ForgetPod(*framework.CachePodInfo) error

	PeriodWorker(mu *sync.RWMutex)
}

func NewBaseStore

func NewBaseStore() BaseStore

type BaseStoreImpl

type BaseStoreImpl struct{}

func (*BaseStoreImpl) AddCNR

func (*BaseStoreImpl) AddMovement

func (i *BaseStoreImpl) AddMovement(movement *schedulingv1a1.Movement) error

func (*BaseStoreImpl) AddNMNode

func (i *BaseStoreImpl) AddNMNode(nmNode *nodev1alpha1.NMNode) error

func (*BaseStoreImpl) AddNode

func (i *BaseStoreImpl) AddNode(node *v1.Node) error

func (*BaseStoreImpl) AddOwner

func (i *BaseStoreImpl) AddOwner(ownerType, key string, labels map[string]string) error

func (*BaseStoreImpl) AddPDB

func (*BaseStoreImpl) AddPod

func (i *BaseStoreImpl) AddPod(pod *v1.Pod) error

func (*BaseStoreImpl) AddPodGroup

func (i *BaseStoreImpl) AddPodGroup(podGroup *schedulingv1a1.PodGroup) error

func (*BaseStoreImpl) AddReservation

func (i *BaseStoreImpl) AddReservation(*schedulingv1a1.Reservation) error

func (*BaseStoreImpl) AssumePod

func (i *BaseStoreImpl) AssumePod(podInfo *framework.CachePodInfo) error

func (*BaseStoreImpl) DeleteCNR

func (*BaseStoreImpl) DeleteMovement

func (i *BaseStoreImpl) DeleteMovement(movement *schedulingv1a1.Movement) error

func (*BaseStoreImpl) DeleteNMNode

func (i *BaseStoreImpl) DeleteNMNode(nmNode *nodev1alpha1.NMNode) error

func (*BaseStoreImpl) DeleteNode

func (i *BaseStoreImpl) DeleteNode(node *v1.Node) error

func (*BaseStoreImpl) DeleteOwner

func (i *BaseStoreImpl) DeleteOwner(ownerType, key string) error

func (*BaseStoreImpl) DeletePDB

func (i *BaseStoreImpl) DeletePDB(pdb *policy.PodDisruptionBudget) error

func (*BaseStoreImpl) DeletePod

func (i *BaseStoreImpl) DeletePod(pod *v1.Pod) error

func (*BaseStoreImpl) DeletePodGroup

func (i *BaseStoreImpl) DeletePodGroup(podGroup *schedulingv1a1.PodGroup) error

func (*BaseStoreImpl) DeleteReservation

func (i *BaseStoreImpl) DeleteReservation(*schedulingv1a1.Reservation) error

func (*BaseStoreImpl) ForgetPod

func (i *BaseStoreImpl) ForgetPod(podInfo *framework.CachePodInfo) error

func (*BaseStoreImpl) PeriodWorker

func (i *BaseStoreImpl) PeriodWorker(mu *sync.RWMutex)

func (*BaseStoreImpl) UpdateCNR

func (i *BaseStoreImpl) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error

func (*BaseStoreImpl) UpdateMovement

func (i *BaseStoreImpl) UpdateMovement(_, _ *schedulingv1a1.Movement) error

func (*BaseStoreImpl) UpdateNMNode

func (i *BaseStoreImpl) UpdateNMNode(oldNMNode, newNMNode *nodev1alpha1.NMNode) error

func (*BaseStoreImpl) UpdateNode

func (i *BaseStoreImpl) UpdateNode(oldNode, newNode *v1.Node) error

func (*BaseStoreImpl) UpdateOwner

func (i *BaseStoreImpl) UpdateOwner(ownerType, key string, oldLabels, newLabels map[string]string) error

func (*BaseStoreImpl) UpdatePDB

func (i *BaseStoreImpl) UpdatePDB(oldPdb, newPdb *policy.PodDisruptionBudget) error

func (*BaseStoreImpl) UpdatePod

func (i *BaseStoreImpl) UpdatePod(oldPod, newPod *v1.Pod) error

func (*BaseStoreImpl) UpdatePodGroup

func (i *BaseStoreImpl) UpdatePodGroup(oldPodGroup, newPodGroup *schedulingv1a1.PodGroup) error

func (*BaseStoreImpl) UpdateReservation

func (i *BaseStoreImpl) UpdateReservation(_, _ *schedulingv1a1.Reservation) error

type CommonStoresSwitch

type CommonStoresSwitch interface {
	commoncache.ClusterEventsHandler
	Find(name StoreName) Store
	Range(f RangeFunc) error
}

func MakeStoreSwitch

func MakeStoreSwitch(handler commoncache.CacheHandler, storeType StoreType, globalRegistries Registries, orderedStoreNames []StoreName) CommonStoresSwitch

type CommonStoresSwitchImpl

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

func (*CommonStoresSwitchImpl) AddCNR

func (*CommonStoresSwitchImpl) AddMovement

func (s *CommonStoresSwitchImpl) AddMovement(movement *schedulingv1a1.Movement) error

func (*CommonStoresSwitchImpl) AddNMNode

func (s *CommonStoresSwitchImpl) AddNMNode(nmNode *nodev1alpha1.NMNode) error

func (*CommonStoresSwitchImpl) AddNode

func (s *CommonStoresSwitchImpl) AddNode(node *v1.Node) error

func (*CommonStoresSwitchImpl) AddOwner

func (s *CommonStoresSwitchImpl) AddOwner(ownerType, key string, labels map[string]string) error

func (*CommonStoresSwitchImpl) AddPDB

func (*CommonStoresSwitchImpl) AddPod

func (s *CommonStoresSwitchImpl) AddPod(pod *v1.Pod) error

func (*CommonStoresSwitchImpl) AddPodGroup

func (s *CommonStoresSwitchImpl) AddPodGroup(podGroup *schedulingv1a1.PodGroup) error

func (*CommonStoresSwitchImpl) AddReservation

func (s *CommonStoresSwitchImpl) AddReservation(prr *schedulingv1a1.Reservation) error

func (*CommonStoresSwitchImpl) DeleteCNR

func (*CommonStoresSwitchImpl) DeleteMovement

func (s *CommonStoresSwitchImpl) DeleteMovement(movement *schedulingv1a1.Movement) error

func (*CommonStoresSwitchImpl) DeleteNMNode

func (s *CommonStoresSwitchImpl) DeleteNMNode(nmNode *nodev1alpha1.NMNode) error

func (*CommonStoresSwitchImpl) DeleteNode

func (s *CommonStoresSwitchImpl) DeleteNode(node *v1.Node) error

func (*CommonStoresSwitchImpl) DeleteOwner

func (s *CommonStoresSwitchImpl) DeleteOwner(ownerType, key string) error

func (*CommonStoresSwitchImpl) DeletePDB

func (*CommonStoresSwitchImpl) DeletePod

func (s *CommonStoresSwitchImpl) DeletePod(pod *v1.Pod) error

func (*CommonStoresSwitchImpl) DeletePodGroup

func (s *CommonStoresSwitchImpl) DeletePodGroup(podGroup *schedulingv1a1.PodGroup) error

func (*CommonStoresSwitchImpl) DeleteReservation

func (s *CommonStoresSwitchImpl) DeleteReservation(prr *schedulingv1a1.Reservation) error

func (*CommonStoresSwitchImpl) Find

func (s *CommonStoresSwitchImpl) Find(name StoreName) Store

func (*CommonStoresSwitchImpl) Range

func (*CommonStoresSwitchImpl) String

func (s *CommonStoresSwitchImpl) String() string

func (*CommonStoresSwitchImpl) UpdateCNR

func (s *CommonStoresSwitchImpl) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error

func (*CommonStoresSwitchImpl) UpdateMovement

func (s *CommonStoresSwitchImpl) UpdateMovement(oldMovement, newMovement *schedulingv1a1.Movement) error

func (*CommonStoresSwitchImpl) UpdateNMNode

func (s *CommonStoresSwitchImpl) UpdateNMNode(oldNMNode, newNMNode *nodev1alpha1.NMNode) error

func (*CommonStoresSwitchImpl) UpdateNode

func (s *CommonStoresSwitchImpl) UpdateNode(oldNode, newNode *v1.Node) error

func (*CommonStoresSwitchImpl) UpdateOwner

func (s *CommonStoresSwitchImpl) UpdateOwner(ownerType, key string, oldLabels, newLabels map[string]string) error

func (*CommonStoresSwitchImpl) UpdatePDB

func (s *CommonStoresSwitchImpl) UpdatePDB(oldPdb, newPdb *policy.PodDisruptionBudget) error

func (*CommonStoresSwitchImpl) UpdatePod

func (s *CommonStoresSwitchImpl) UpdatePod(oldPod, newPod *v1.Pod) error

func (*CommonStoresSwitchImpl) UpdatePodGroup

func (s *CommonStoresSwitchImpl) UpdatePodGroup(oldPodGroup, newPodGroup *schedulingv1a1.PodGroup) error

func (*CommonStoresSwitchImpl) UpdateReservation

func (s *CommonStoresSwitchImpl) UpdateReservation(oldPrr, newPrr *schedulingv1a1.Reservation) error

type FeatureGateChecker

type FeatureGateChecker func(commoncache.CacheHandler) bool

type New

type New func(commoncache.CacheHandler) Store

type RangeFunc

type RangeFunc func(Store) error

type Registries

type Registries interface {
	Register(name StoreName, checker FeatureGateChecker, newCache, newSnapshot New)

	CacheRegistry() Registry
	SnapshotRegistry() Registry
	FeatureGateCheckers() map[StoreName]FeatureGateChecker
}

func NewRegistries

func NewRegistries() Registries

type Registry

type Registry map[StoreName]New

type Store

type Store interface {
	BaseStore

	Name() StoreName
	UpdateSnapshot(Store) error
}

type StoreName

type StoreName string

type StoreType

type StoreType int
const (
	Cache StoreType = iota
	Snapshot
)

Jump to

Keyboard shortcuts

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