Documentation
¶
Index ¶
- func GetMetadataUniqueKey(ctx context.Context, key string) (string, error)
- type Server
- func (s *Server) CollectAgentsSpecs(ctx context.Context)
- func (s *Server) ExecTask(stream proto.Cluster_ExecTaskServer) error
- func (s *Server) GetInventory() *inventory.Agents
- func (s *Server) Handshake(ctx context.Context, req *proto.HandshakeRequest) (*proto.HandshakeResponse, error)
- func (s *Server) ListAgentPlugins(ctx context.Context, req *emptypb.Empty) (*proto.ListAgentPluginsResponse, error)
- func (s *Server) RequestShutdown(agentID agent.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.Agents
// contains filtered or unexported fields
}
func New ¶
func New(config ServerConfig, agentsInventory *inventory.Agents, taskDispatcher forwarder.Dispatcher[*proto.TaskRequest, *proto.TaskResponse], jobDatabase *badger.DB) Server
func (*Server) CollectAgentsSpecs ¶
func (*Server) ExecTask ¶
func (s *Server) ExecTask(stream proto.Cluster_ExecTaskServer) error
ExecTask spawn a stream with each agents.
It handles the sending of requests and the routing of the response. The responses is 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 handle agent registration.
It checks if the agent changed to detect potential rogue.
func (*Server) ListAgentPlugins ¶
Click to show internal directories.
Click to hide internal directories.