Documentation ¶
Index ¶
- type NodeManager
- func (n *NodeManager) Add(ctx context.Context, nodeInfo models.NodeInfo) error
- func (n *NodeManager) Delete(ctx context.Context, nodeID string) error
- func (n *NodeManager) FindPeer(ctx context.Context, peerID peer.ID) (peer.AddrInfo, error)
- func (n *NodeManager) Get(ctx context.Context, nodeID string) (models.NodeInfo, error)
- func (n *NodeManager) GetByPrefix(ctx context.Context, prefix string) (models.NodeInfo, error)
- func (n *NodeManager) List(ctx context.Context, filters ...routing.NodeInfoFilter) ([]models.NodeInfo, error)
- func (n *NodeManager) Register(ctx context.Context, request requests.RegisterRequest) (*requests.RegisterResponse, 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) GetByPrefix ¶
func (*NodeManager) List ¶
func (n *NodeManager) List(ctx context.Context, filters ...routing.NodeInfoFilter) ([]models.NodeInfo, 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) 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 info 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
}