nodestore

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Name commonstore.StoreName = "NodeStore"

Variables

View Source
var GlobalNodeInfoPlaceHolder = framework.NewNodeInfo()

Functions

func AssignMicroTopology

func AssignMicroTopology(node framework.NodeInfo, pod *v1.Pod) error

-------------------------------------- topology --------------------------------------

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
	AfterAdd    func(framework.NodeInfo) // Triggered by a call to the NodeStore.Add function, used to maintain additional information about the node.
	AfterDelete func(framework.NodeInfo) // Triggered by a call to the NodeStore.Delete function, used to maintain additional information about the node.
	// contains filtered or unexported fields
}

-------------------------------------- NodeStore --------------------------------------

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 (c *NodeStore) Name() commonstore.StoreName

func (*NodeStore) NodeInThisPartition

func (s *NodeStore) NodeInThisPartition(nodeName string) bool

func (*NodeStore) Set

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

Set will Store the node without trigger any function.

func (*NodeStore) SetNodeInPartition

func (s *NodeStore) SetNodeInPartition(nodeName string) error

func (*NodeStore) SetNodeOutOfPartition

func (s *NodeStore) SetNodeOutOfPartition(nodeName string) error

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 (cacheStore *NodeStore) UpdateSnapshot(store commonstore.Store) error

Jump to

Keyboard shortcuts

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