Documentation
¶
Index ¶
- func GetMetadataUniqueKey(ctx context.Context, key string) (string, error)
- type Server
- func (s *Server) CollectNodesSpecs(ctx context.Context)
- func (s *Server) ExecTask(stream proto.Cluster_ExecTaskServer) error
- func (s *Server) GetInventory() *inventory.Nodes
- func (s *Server) Handshake(ctx context.Context, req *proto.HandshakeRequest) (*proto.HandshakeResponse, error)
- func (s *Server) ListNodePlugins(ctx context.Context, req *emptypb.Empty) (*proto.ListNodePluginsResponse, error)
- func (s *Server) RequestShutdown(nodeID node.ID) error
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
proto.UnimplementedClusterServer
Inventory *inventory.Nodes
// contains filtered or unexported fields
}
func New ¶
func New(config ServerConfig, nodesInventory *inventory.Nodes, taskDispatcher forwarder.Dispatcher[*proto.TaskRequest, *proto.TaskResponse], jobDatabase *badger.DB) Server
func (*Server) CollectNodesSpecs ¶ added in v0.1.0
func (*Server) ExecTask ¶
func (s *Server) ExecTask(stream proto.Cluster_ExecTaskServer) error
ExecTask spawns a stream with each node.
It handles the sending of requests and the routing of the response. The responses are routed to the dispatcher (usually the forwarder).
func (*Server) GetInventory ¶
GetInventory returns the server's inventory.
func (*Server) Handshake ¶
func (s *Server) Handshake(ctx context.Context, req *proto.HandshakeRequest) (*proto.HandshakeResponse, error)
Handshake handles node registration.
It checks if the node changed to detect potential rogue.
func (*Server) ListNodePlugins ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.