manager

package
v1.3.2-rc2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 11 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.NodeState) error

func (*NodeManager) ApproveAction added in v1.3.1

func (n *NodeManager) ApproveAction(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) DeleteAction added in v1.3.1

func (n *NodeManager) DeleteAction(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) 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.NodeState, error)

func (*NodeManager) GetByPrefix

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

func (*NodeManager) List

func (n *NodeManager) List(ctx context.Context, filters ...routing.NodeStateFilter) ([]models.NodeState, 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) RejectAction added in v1.3.1

func (n *NodeManager) RejectAction(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) Start added in v1.3.1

func (n *NodeManager) Start(ctx context.Context) error

func (*NodeManager) UpdateInfo

UpdateInfo is part of the implementation of the ManagementEndpoint interface. It is used to update the node state 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
	Heartbeats           *heartbeat.HeartbeatServer
	DefaultApprovalState models.NodeMembershipState
}

Jump to

Keyboard shortcuts

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