server

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
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

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

func (*AgentServer) Stop

func (s *AgentServer) Stop()

Stop stops the gRPC server

Jump to

Keyboard shortcuts

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