grpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	pb.UnimplementedAgentServiceServer
	// contains filtered or unexported fields
}

Server represents the gRPC server

func New

func New(cfg *config.Config, logger zerolog.Logger) (*Server, error)

New creates a new gRPC server instance

func (*Server) AgentStream

func (s *Server) AgentStream(stream pb.AgentService_AgentStreamServer) error

AgentStream implements the AgentStream RPC method

func (*Server) ExecuteCommand

func (s *Server) ExecuteCommand(ctx context.Context, req *pb.CommandRequest) (*pb.CommandResponse, error)

ExecuteCommand implements the ExecuteCommand RPC method

func (*Server) GracefulStop

func (s *Server) GracefulStop()

GracefulStop gracefully stops the gRPC server

func (*Server) HealthCheck

func (s *Server) HealthCheck(ctx context.Context, req *pb.HealthCheckRequest) (*pb.HealthCheckResponse, error)

HealthCheck implements the HealthCheck RPC method

func (*Server) Serve

func (s *Server) Serve(address string) error

Serve starts the gRPC server

func (*Server) Stop

func (s *Server) Stop()

Stop forcefully stops the gRPC server

func (*Server) StreamLogs

func (s *Server) StreamLogs(req *pb.LogStreamRequest, stream pb.AgentService_StreamLogsServer) error

StreamLogs implements the StreamLogs RPC method

func (*Server) UpdateConfig

func (s *Server) UpdateConfig(ctx context.Context, req *pb.ConfigUpdateRequest) (*pb.ConfigUpdateResponse, error)

UpdateConfig implements the UpdateConfig RPC method

Jump to

Keyboard shortcuts

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