Documentation
¶
Index ¶
- Constants
- type AgentServer
- func (s *AgentServer) ApproveExecutionPlan(ctx context.Context, req *pb.ApprovalRequest) (*pb.ApprovalResponse, error)
- func (s *AgentServer) GenerateExecutionPlan(ctx context.Context, req *pb.PlanRequest) (*pb.PlanResponse, error)
- func (s *AgentServer) GetCapabilities(ctx context.Context, req *pb.CapabilitiesRequest) (*pb.CapabilitiesResponse, error)
- func (s *AgentServer) GetMetadata(ctx context.Context, req *pb.MetadataRequest) (*pb.MetadataResponse, error)
- func (s *AgentServer) GetPort() int
- func (s *AgentServer) Health(ctx context.Context, req *pb.HealthRequest) (*pb.HealthResponse, error)
- func (s *AgentServer) Ready(ctx context.Context, req *pb.ReadinessRequest) (*pb.ReadinessResponse, error)
- func (s *AgentServer) Run(ctx context.Context, req *pb.RunRequest) (*pb.RunResponse, error)
- func (s *AgentServer) RunStream(req *pb.RunRequest, stream pb.AgentService_RunStreamServer) error
- func (s *AgentServer) Start(port int) error
- func (s *AgentServer) StartWithListener(listener net.Listener) error
- func (s *AgentServer) Stop()
Constants ¶
const JWTTokenKey contextKey = "jwtToken"
JWTTokenKey is used for JWT token context propagation - must match starops-tools exactly
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentServer ¶
type AgentServer struct {
pb.UnimplementedAgentServiceServer
// contains filtered or unexported fields
}
AgentServer implements the gRPC AgentService
func NewAgentServer ¶
func NewAgentServer(agent *agent.Agent) *AgentServer
NewAgentServer creates a new AgentServer wrapping the provided agent
func (*AgentServer) ApproveExecutionPlan ¶
func (s *AgentServer) ApproveExecutionPlan(ctx context.Context, req *pb.ApprovalRequest) (*pb.ApprovalResponse, error)
ApproveExecutionPlan approves an execution plan
func (*AgentServer) GenerateExecutionPlan ¶
func (s *AgentServer) GenerateExecutionPlan(ctx context.Context, req *pb.PlanRequest) (*pb.PlanResponse, error)
GenerateExecutionPlan generates an execution plan (if the agent supports it)
func (*AgentServer) GetCapabilities ¶
func (s *AgentServer) GetCapabilities(ctx context.Context, req *pb.CapabilitiesRequest) (*pb.CapabilitiesResponse, error)
GetCapabilities returns agent capabilities
func (*AgentServer) GetMetadata ¶
func (s *AgentServer) GetMetadata(ctx context.Context, req *pb.MetadataRequest) (*pb.MetadataResponse, error)
GetMetadata returns agent metadata
func (*AgentServer) GetPort ¶
func (s *AgentServer) GetPort() int
GetPort returns the port the server is listening on
func (*AgentServer) Health ¶
func (s *AgentServer) Health(ctx context.Context, req *pb.HealthRequest) (*pb.HealthResponse, error)
Health returns the health status of the agent service
func (*AgentServer) Ready ¶
func (s *AgentServer) Ready(ctx context.Context, req *pb.ReadinessRequest) (*pb.ReadinessResponse, error)
Ready returns the readiness status of the agent service
func (*AgentServer) Run ¶
func (s *AgentServer) Run(ctx context.Context, req *pb.RunRequest) (*pb.RunResponse, error)
Run executes the agent with the given input
func (*AgentServer) RunStream ¶
func (s *AgentServer) RunStream(req *pb.RunRequest, stream pb.AgentService_RunStreamServer) error
RunStream executes the agent with streaming response
func (*AgentServer) Start ¶
func (s *AgentServer) Start(port int) error
Start starts the gRPC server on the specified port
func (*AgentServer) StartWithListener ¶
func (s *AgentServer) StartWithListener(listener net.Listener) error
StartWithListener starts the gRPC server with an existing listener