manager

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 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) Approve added in v1.3.0

func (n *NodeManager) Approve(ctx context.Context, nodeID string, reason string) (bool, string)

Approve is used to approve a node for joining the cluster along with a specific reason for the approval (for audit). The return values denote success and any failure of the operation as a human readable string.

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) Reject added in v1.3.0

func (n *NodeManager) Reject(ctx context.Context, nodeID string, reason string) (bool, string)

Reject is used to reject a node from joining the cluster along with a specific reason for the rejection (for audit). The return values denote success and any failure of the operation as a human readable string.

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