nodestore

package
v0.0.0-...-e2cac0c Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Name commonstore.StoreName = "NodeStore"

Variables

This section is empty.

Functions

func NewCache

func NewCache(handler commoncache.CacheHandler) commonstore.Store

func NewSnapshot

func NewSnapshot(handler commoncache.CacheHandler) commonstore.Store

Types

type NodeStore

type NodeStore struct {
	commonstore.BaseStore

	Store generationstore.Store // Holds all nodes including those that have been Deleted but still have residual pods.
	// `Deleted` holds all the nodes:
	// 1. that have been deleted but still have residual pods.
	// 2. that its pod comes before its own, so we can't use it to schedule.
	Deleted sets.String
	// contains filtered or unexported fields
}

func (*NodeStore) Add

func (s *NodeStore) Add(nodeName string, nodeInfo framework.NodeInfo)

Add will Store the node and trigger the AfterAdd.

func (*NodeStore) AddCNR

func (*NodeStore) AddNMNode

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

func (*NodeStore) AddNode

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

func (*NodeStore) AddPod

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

func (*NodeStore) AllNodesClone

func (s *NodeStore) AllNodesClone() map[string]framework.NodeInfo

AllNodesClone return all nodes's deepcopy and organize them in map.

func (*NodeStore) AssumePod

func (s *NodeStore) AssumePod(podInfo *framework.CachePodInfo) error

func (*NodeStore) Delete

func (s *NodeStore) Delete(nodeName string, nodeInfo framework.NodeInfo)

Delete will delete the node and trigger the AfterDelete.

func (*NodeStore) DeleteCNR

DeleteCNR removes custom node resource. The node might be still in the node tree because their deletion events didn't arrive yet.

func (*NodeStore) DeleteNMNode

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

func (*NodeStore) DeleteNode

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

func (*NodeStore) DeletePod

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

func (*NodeStore) ForgetPod

func (s *NodeStore) ForgetPod(podInfo *framework.CachePodInfo) error

func (*NodeStore) Get

func (s *NodeStore) Get(nodeName string) framework.NodeInfo

Set will get the node without trigger any function.

func (*NodeStore) GetNodeInfo

func (s *NodeStore) GetNodeInfo(nodeName string) framework.NodeInfo

func (*NodeStore) Len

func (s *NodeStore) Len() int

func (*NodeStore) Name

func (s *NodeStore) Name() commonstore.StoreName

func (*NodeStore) Set

func (s *NodeStore) Set(nodeName string, nodeInfo framework.NodeInfo)

Set will Store the node without trigger any function.

func (*NodeStore) UpdateCNR

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

func (*NodeStore) UpdateNMNode

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

func (*NodeStore) UpdateNode

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

func (*NodeStore) UpdatePod

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

func (*NodeStore) UpdateSnapshot

func (s *NodeStore) UpdateSnapshot(store commonstore.Store) error

Jump to

Keyboard shortcuts

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