manager

package
v1.2.3-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 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 NodeManager

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

NodeManager is responsible for managing compute nodes and their membership within the cluster through the entire lifecycle. It also provides operations for querying and managing compute node information.

func NewNodeManager

func NewNodeManager(params NodeManagerParams) *NodeManager

NewNodeManager constructs a new node manager and returns a pointer to the structure.

func (*NodeManager) Add

func (n *NodeManager) Add(ctx context.Context, nodeInfo models.NodeInfo) error

func (*NodeManager) Delete

func (n *NodeManager) Delete(ctx context.Context, nodeID string) error

func (*NodeManager) FindPeer

func (n *NodeManager) FindPeer(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error)

---- Implementation of routing.NodeInfoStore ----

func (*NodeManager) Get

func (n *NodeManager) Get(ctx context.Context, nodeID string) (models.NodeInfo, error)

func (*NodeManager) GetByPrefix

func (n *NodeManager) GetByPrefix(ctx context.Context, prefix string) (models.NodeInfo, error)

func (*NodeManager) List

func (n *NodeManager) List(ctx context.Context, filters ...routing.NodeInfoFilter) ([]models.NodeInfo, error)

func (*NodeManager) Register

Register is part of the implementation of the ManagementEndpoint interface. It is used to register a compute node with the cluster.

func (*NodeManager) UpdateInfo

UpdateInfo is part of the implementation of the ManagementEndpoint interface. It is used to update the node info for a particular node

func (*NodeManager) UpdateResources

UpdateResources updates the available resources in our in-memory store for each node. This data is used to augment information about the available resources for each node.

type NodeManagerParams

type NodeManagerParams struct {
	NodeInfo routing.NodeInfoStore
}

Jump to

Keyboard shortcuts

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