Documentation
¶
Overview ¶
Package grpcserver translates Wire RPCs into core operations and sanitized protocol responses.
Index ¶
- func StreamRecoveryInterceptor(server any, stream grpc.ServerStream, _ *grpc.StreamServerInfo, ...) (err error)
- func UnaryRecoveryInterceptor(ctx context.Context, request any, _ *grpc.UnaryServerInfo, ...) (response any, err error)
- type DebugService
- func (s *DebugService) Breakpoints(ctx context.Context, request *wirev1.BreakpointsRequest) (*wirev1.BreakpointsResponse, error)
- func (s *DebugService) Continue(ctx context.Context, request *wirev1.ContinueRequest) (*wirev1.ContinueResponse, error)
- func (s *DebugService) CreateDebugSession(ctx context.Context, request *wirev1.CreateDebugSessionRequest) (*wirev1.CreateDebugSessionResponse, error)
- func (s *DebugService) DeleteBreakpoint(ctx context.Context, request *wirev1.DeleteBreakpointRequest) (*wirev1.DeleteBreakpointResponse, error)
- func (s *DebugService) Evaluate(ctx context.Context, request *wirev1.EvaluateRequest) (*wirev1.EvaluateResponse, error)
- func (s *DebugService) EvaluateFrame(ctx context.Context, request *wirev1.EvaluateFrameRequest) (*wirev1.EvaluateFrameResponse, error)
- func (s *DebugService) FrameLocals(ctx context.Context, request *wirev1.FrameLocalsRequest) (*wirev1.FrameLocalsResponse, error)
- func (s *DebugService) Frames(ctx context.Context, request *wirev1.FramesRequest) (*wirev1.FramesResponse, error)
- func (s *DebugService) Locals(ctx context.Context, request *wirev1.LocalsRequest) (*wirev1.LocalsResponse, error)
- func (s *DebugService) Pause(ctx context.Context, request *wirev1.PauseRequest) (*wirev1.PauseResponse, error)
- func (s *DebugService) ReleaseDebugSession(ctx context.Context, request *wirev1.ReleaseDebugSessionRequest) (*wirev1.ReleaseDebugSessionResponse, error)
- func (s *DebugService) ReplaceBreakpoints(ctx context.Context, request *wirev1.ReplaceBreakpointsRequest) (*wirev1.ReplaceBreakpointsResponse, error)
- func (s *DebugService) RunCommand(request *wirev1.RunCommandRequest, stream wirev1.DebugService_RunCommandServer) error
- func (s *DebugService) SetBreakpoint(ctx context.Context, request *wirev1.SetBreakpointRequest) (*wirev1.SetBreakpointResponse, error)
- func (s *DebugService) Start(ctx context.Context, request *wirev1.StartRequest) (*wirev1.StartResponse, error)
- func (s *DebugService) StepIn(ctx context.Context, request *wirev1.StepInRequest) (*wirev1.StepInResponse, error)
- func (s *DebugService) StepOut(ctx context.Context, request *wirev1.StepOutRequest) (*wirev1.StepOutResponse, error)
- func (s *DebugService) StepOver(ctx context.Context, request *wirev1.StepOverRequest) (*wirev1.StepOverResponse, error)
- func (s *DebugService) Terminate(ctx context.Context, request *wirev1.TerminateRequest) (*wirev1.TerminateResponse, error)
- func (s *DebugService) Variables(ctx context.Context, request *wirev1.VariablesRequest) (*wirev1.VariablesResponse, error)
- func (s *DebugService) WatchDebug(request *wirev1.WatchDebugRequest, stream wirev1.DebugService_WatchDebugServer) error
- type ExecutionService
- func (s *ExecutionService) CancelExecution(ctx context.Context, request *wirev1.CancelExecutionRequest) (*wirev1.CancelExecutionResponse, error)
- func (s *ExecutionService) Execute(ctx context.Context, request *wirev1.ExecuteRequest) (*wirev1.ExecuteResponse, error)
- func (s *ExecutionService) ReleaseExecution(ctx context.Context, request *wirev1.ReleaseExecutionRequest) (*wirev1.ReleaseExecutionResponse, error)
- func (s *ExecutionService) RunSession(ctx context.Context, request *wirev1.RunSessionRequest) (*wirev1.RunSessionResponse, error)
- func (s *ExecutionService) WatchExecution(request *wirev1.WatchExecutionRequest, ...) error
- type Handshake
- type PlanService
- func (s *PlanService) ClosePlan(ctx context.Context, request *wirev1.ClosePlanRequest) (*wirev1.ClosePlanResponse, error)
- func (s *PlanService) Compile(ctx context.Context, request *wirev1.CompileRequest) (*wirev1.CompileResponse, error)
- func (s *PlanService) CompileDebug(ctx context.Context, request *wirev1.CompileDebugRequest) (*wirev1.CompileDebugResponse, error)
- func (s *PlanService) ReleasePlan(ctx context.Context, request *wirev1.ReleasePlanRequest) (*wirev1.ReleasePlanResponse, error)
- type RuntimeService
- func (s *RuntimeService) CloseConnection(ctx context.Context, request *wirev1.CloseConnectionRequest) (*wirev1.CloseConnectionResponse, error)
- func (s *RuntimeService) Connect(_ *wirev1.ConnectRequest, stream wirev1.RuntimeService_ConnectServer) error
- func (s *RuntimeService) Run(ctx context.Context, request *wirev1.RunRequest) (*wirev1.RunResponse, error)
- type Server
- type SessionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamRecoveryInterceptor ¶
func StreamRecoveryInterceptor( server any, stream grpc.ServerStream, _ *grpc.StreamServerInfo, handler grpc.StreamHandler, ) (err error)
StreamRecoveryInterceptor replaces recovered stream-handler panics with sanitized internal statuses.
func UnaryRecoveryInterceptor ¶
func UnaryRecoveryInterceptor( ctx context.Context, request any, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (response any, err error)
UnaryRecoveryInterceptor replaces recovered handler panics with sanitized internal statuses.
Types ¶
type DebugService ¶
type DebugService struct {
wirev1.UnimplementedDebugServiceServer
// contains filtered or unexported fields
}
DebugService adapts debugger lifecycle, commands, inspection, and events.
func (*DebugService) Breakpoints ¶
func (s *DebugService) Breakpoints(ctx context.Context, request *wirev1.BreakpointsRequest) (*wirev1.BreakpointsResponse, error)
Breakpoints enumerates the complete hosted snapshot, including after termination.
func (*DebugService) Continue ¶
func (s *DebugService) Continue(ctx context.Context, request *wirev1.ContinueRequest) (*wirev1.ContinueResponse, error)
Continue acknowledges a debugger resume; WatchDebug carries later stops.
func (*DebugService) CreateDebugSession ¶
func (s *DebugService) CreateDebugSession( ctx context.Context, request *wirev1.CreateDebugSessionRequest, ) (*wirev1.CreateDebugSessionResponse, error)
CreateDebugSession decodes options and creates a debugger under the requested plan.
func (*DebugService) DeleteBreakpoint ¶
func (s *DebugService) DeleteBreakpoint(ctx context.Context, request *wirev1.DeleteBreakpointRequest) (*wirev1.DeleteBreakpointResponse, error)
DeleteBreakpoint validates the protocol ID before removing the session's breakpoint.
func (*DebugService) Evaluate ¶
func (s *DebugService) Evaluate(ctx context.Context, request *wirev1.EvaluateRequest) (*wirev1.EvaluateResponse, error)
Evaluate preserves the hosted default-frame operation.
func (*DebugService) EvaluateFrame ¶
func (s *DebugService) EvaluateFrame(ctx context.Context, request *wirev1.EvaluateFrameRequest) (*wirev1.EvaluateFrameResponse, error)
EvaluateFrame evaluates in a stopped frame and converts the resulting debugger value.
func (*DebugService) FrameLocals ¶
func (s *DebugService) FrameLocals(ctx context.Context, request *wirev1.FrameLocalsRequest) (*wirev1.FrameLocalsResponse, error)
FrameLocals converts variables from the requested stopped frame.
func (*DebugService) Frames ¶
func (s *DebugService) Frames(ctx context.Context, request *wirev1.FramesRequest) (*wirev1.FramesResponse, error)
Frames converts stopped-debugger frames, rejecting unrepresentable runtime values.
func (*DebugService) Locals ¶
func (s *DebugService) Locals(ctx context.Context, request *wirev1.LocalsRequest) (*wirev1.LocalsResponse, error)
Locals preserves the hosted default-frame operation.
func (*DebugService) Pause ¶
func (s *DebugService) Pause(ctx context.Context, request *wirev1.PauseRequest) (*wirev1.PauseResponse, error)
Pause requests interruption; WatchDebug reports the resulting state transition.
func (*DebugService) ReleaseDebugSession ¶
func (s *DebugService) ReleaseDebugSession( ctx context.Context, request *wirev1.ReleaseDebugSessionRequest, ) (*wirev1.ReleaseDebugSessionResponse, error)
ReleaseDebugSession reclaims a debugger through its logical connection.
func (*DebugService) ReplaceBreakpoints ¶
func (s *DebugService) ReplaceBreakpoints(ctx context.Context, request *wirev1.ReplaceBreakpointsRequest) (*wirev1.ReplaceBreakpointsResponse, error)
ReplaceBreakpoints projects one source-wide atomic publication.
func (*DebugService) RunCommand ¶
func (s *DebugService) RunCommand(request *wirev1.RunCommandRequest, stream wirev1.DebugService_RunCommandServer) error
RunCommand preserves command contexts and carries events independently of errors. A Start stream owns the execution context, unlike a non-owning WatchDebug stream.
func (*DebugService) SetBreakpoint ¶
func (s *DebugService) SetBreakpoint(ctx context.Context, request *wirev1.SetBreakpointRequest) (*wirev1.SetBreakpointResponse, error)
SetBreakpoint validates protocol locations and options before installing a breakpoint.
func (*DebugService) Start ¶
func (s *DebugService) Start(ctx context.Context, request *wirev1.StartRequest) (*wirev1.StartResponse, error)
Start acknowledges an initial debugger resume; WatchDebug carries later stops.
func (*DebugService) StepIn ¶
func (s *DebugService) StepIn(ctx context.Context, request *wirev1.StepInRequest) (*wirev1.StepInResponse, error)
StepIn dispatches a step-in command; WatchDebug carries its result.
func (*DebugService) StepOut ¶
func (s *DebugService) StepOut(ctx context.Context, request *wirev1.StepOutRequest) (*wirev1.StepOutResponse, error)
StepOut dispatches a step-out command; WatchDebug carries its result.
func (*DebugService) StepOver ¶
func (s *DebugService) StepOver(ctx context.Context, request *wirev1.StepOverRequest) (*wirev1.StepOverResponse, error)
StepOver dispatches a step-over command; WatchDebug carries its result.
func (*DebugService) Terminate ¶
func (s *DebugService) Terminate(ctx context.Context, request *wirev1.TerminateRequest) (*wirev1.TerminateResponse, error)
Terminate stops the debugger while retaining its handle until explicit release.
func (*DebugService) Variables ¶
func (s *DebugService) Variables(ctx context.Context, request *wirev1.VariablesRequest) (*wirev1.VariablesResponse, error)
Variables validates a protocol reference before expanding and converting its children.
func (*DebugService) WatchDebug ¶
func (s *DebugService) WatchDebug(request *wirev1.WatchDebugRequest, stream wirev1.DebugService_WatchDebugServer) error
WatchDebug sends the current snapshot followed by ordered debugger transitions. Stream completion releases the bounded subscription.
type ExecutionService ¶
type ExecutionService struct {
wirev1.UnimplementedExecutionServiceServer
// contains filtered or unexported fields
}
ExecutionService adapts the execution RPC contract to its core owners.
func (*ExecutionService) CancelExecution ¶
func (s *ExecutionService) CancelExecution(ctx context.Context, request *wirev1.CancelExecutionRequest) (*wirev1.CancelExecutionResponse, error)
CancelExecution requests cancellation without waiting for the run to settle.
func (*ExecutionService) Execute ¶
func (s *ExecutionService) Execute(ctx context.Context, request *wirev1.ExecuteRequest) (*wirev1.ExecuteResponse, error)
Execute starts a plan run with decoded options and returns its initial protocol snapshot.
func (*ExecutionService) ReleaseExecution ¶
func (s *ExecutionService) ReleaseExecution(ctx context.Context, request *wirev1.ReleaseExecutionRequest) (*wirev1.ReleaseExecutionResponse, error)
ReleaseExecution cancels and reclaims the run through its logical connection.
func (*ExecutionService) RunSession ¶
func (s *ExecutionService) RunSession( ctx context.Context, request *wirev1.RunSessionRequest, ) (*wirev1.RunSessionResponse, error)
RunSession starts a run on a durable session and returns its execution handle.
func (*ExecutionService) WatchExecution ¶
func (s *ExecutionService) WatchExecution(request *wirev1.WatchExecutionRequest, stream wirev1.ExecutionService_WatchExecutionServer) error
WatchExecution sends the current snapshot followed by ordered events. Stream completion releases the bounded subscription.
type Handshake ¶
type Handshake struct {
ProtocolName string
ProtocolVersion string
RuntimeName string
RuntimeVersion string
RuntimeInstanceID string
}
Handshake is immutable protocol and host-identity metadata supplied by the server composition root. RuntimeVersion belongs to host identity, not UAPI Version.
type PlanService ¶
type PlanService struct {
wirev1.UnimplementedPlanServiceServer
// contains filtered or unexported fields
}
PlanService adapts the plan RPC contract to its core owners.
func (*PlanService) ClosePlan ¶
func (s *PlanService) ClosePlan(ctx context.Context, request *wirev1.ClosePlanRequest) (*wirev1.ClosePlanResponse, error)
ClosePlan releases hosted plan resources without closing its returned children.
func (*PlanService) Compile ¶
func (s *PlanService) Compile(ctx context.Context, request *wirev1.CompileRequest) (*wirev1.CompileResponse, error)
Compile decodes source and options into a connection-owned normal plan.
func (*PlanService) CompileDebug ¶
func (s *PlanService) CompileDebug(ctx context.Context, request *wirev1.CompileDebugRequest) (*wirev1.CompileDebugResponse, error)
CompileDebug decodes source and options into a connection-owned debuggable plan.
func (*PlanService) ReleasePlan ¶
func (s *PlanService) ReleasePlan(ctx context.Context, request *wirev1.ReleasePlanRequest) (*wirev1.ReleasePlanResponse, error)
ReleasePlan resolves ownership through the request's connection before reclaiming the plan.
type RuntimeService ¶
type RuntimeService struct {
wirev1.UnimplementedRuntimeServiceServer
// contains filtered or unexported fields
}
RuntimeService adapts the runtime RPC contract to its core owners.
func (*RuntimeService) CloseConnection ¶
func (s *RuntimeService) CloseConnection(ctx context.Context, request *wirev1.CloseConnectionRequest) (*wirev1.CloseConnectionResponse, error)
CloseConnection tears down the logical connection identified by the request.
func (*RuntimeService) Connect ¶
func (s *RuntimeService) Connect(_ *wirev1.ConnectRequest, stream wirev1.RuntimeService_ConnectServer) error
Connect keeps a logical connection alive for the stream and reclaims it when the stream ends.
func (*RuntimeService) Run ¶
func (s *RuntimeService) Run( ctx context.Context, request *wirev1.RunRequest, ) (*wirev1.RunResponse, error)
Run decodes session options and registers a direct hosted-runtime execution.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server composes the protocol services over shared core resource owners.
func (*Server) Register ¶
func (s *Server) Register(registrar grpc.ServiceRegistrar)
Register installs all five Wire services on the supplied gRPC registrar.
type SessionService ¶
type SessionService struct {
wirev1.UnimplementedSessionServiceServer
// contains filtered or unexported fields
}
SessionService adapts the session RPC contract to its core owners.
func (*SessionService) CreateSession ¶
func (s *SessionService) CreateSession( ctx context.Context, request *wirev1.CreateSessionRequest, ) (*wirev1.CreateSessionResponse, error)
CreateSession applies decoded options to a durable session under the requested plan.
func (*SessionService) ReleaseSession ¶
func (s *SessionService) ReleaseSession( ctx context.Context, request *wirev1.ReleaseSessionRequest, ) (*wirev1.ReleaseSessionResponse, error)
ReleaseSession reclaims a durable session through its logical connection.
Source Files
¶
- compile_options.go
- debug_command_result.go
- debug_conversion.go
- debug_service.go
- debug_service_commands.go
- debug_service_contract.go
- debug_service_events.go
- debug_service_inspection.go
- errors.go
- execution_conversion.go
- execution_service.go
- failure_conversion.go
- handshake.go
- operation_context.go
- output_conversion.go
- plan_conversion.go
- plan_service.go
- recovery.go
- runtime_service.go
- server.go
- session_options.go
- session_service.go
- source_conversion.go
- subscription.go
- value.go