Documentation ¶
Index ¶
- type NodeManager
- func (n *NodeManager) Add(ctx context.Context, nodeInfo models.NodeState) error
- func (n *NodeManager) ApproveAction(ctx context.Context, nodeID string, reason string) (bool, string)
- func (n *NodeManager) Delete(ctx context.Context, nodeID string) error
- func (n *NodeManager) DeleteAction(ctx context.Context, nodeID string, reason string) (bool, string)
- func (n *NodeManager) Get(ctx context.Context, nodeID string) (models.NodeState, error)
- func (n *NodeManager) GetByPrefix(ctx context.Context, prefix string) (models.NodeState, error)
- func (n *NodeManager) List(ctx context.Context, filters ...routing.NodeStateFilter) ([]models.NodeState, error)
- func (n *NodeManager) Register(ctx context.Context, request requests.RegisterRequest) (*requests.RegisterResponse, error)
- func (n *NodeManager) RejectAction(ctx context.Context, nodeID string, reason string) (bool, string)
- func (n *NodeManager) Start(ctx context.Context) error
- func (n *NodeManager) UpdateInfo(ctx context.Context, request requests.UpdateInfoRequest) (*requests.UpdateInfoResponse, error)
- func (n *NodeManager) UpdateResources(ctx context.Context, request requests.UpdateResourcesRequest) (*requests.UpdateResourcesResponse, error)
- type NodeManagerParams
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) 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) 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) GetByPrefix ¶
func (*NodeManager) List ¶
func (n *NodeManager) List(ctx context.Context, filters ...routing.NodeStateFilter) ([]models.NodeState, error)
func (*NodeManager) Register ¶
func (n *NodeManager) Register(ctx context.Context, request requests.RegisterRequest) (*requests.RegisterResponse, error)
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) UpdateInfo ¶
func (n *NodeManager) UpdateInfo(ctx context.Context, request requests.UpdateInfoRequest) (*requests.UpdateInfoResponse, error)
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 ¶
func (n *NodeManager) UpdateResources(ctx context.Context, request requests.UpdateResourcesRequest) (*requests.UpdateResourcesResponse, error)
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 ManualApproval bool }