server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadataUniqueKey

func GetMetadataUniqueKey(ctx context.Context, key string) (string, error)

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 (s *Server) CollectNodesSpecs(ctx context.Context)

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

func (s *Server) GetInventory() *inventory.Nodes

GetInventory returns the server's inventory.

func (*Server) Handshake

Handshake handles node registration.

It checks if the node changed to detect potential rogue.

func (*Server) ListNodePlugins added in v0.1.0

func (s *Server) ListNodePlugins(ctx context.Context, req *emptypb.Empty) (*proto.ListNodePluginsResponse, error)

func (*Server) RequestShutdown

func (s *Server) RequestShutdown(nodeID node.ID) error

type ServerConfig

type ServerConfig struct {
	AutoAccept  bool
	MTLSEnabled bool
	ConfigDir   string
	PluginDir   string
}

Jump to

Keyboard shortcuts

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