grpcserver

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package grpcserver translates Wire RPCs into core operations and sanitized protocol responses.

Index

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

Breakpoints enumerates the complete hosted snapshot, including after termination.

func (*DebugService) Continue

Continue acknowledges a debugger resume; WatchDebug carries later stops.

func (*DebugService) CreateDebugSession

CreateDebugSession decodes options and creates a debugger under the requested plan.

func (*DebugService) DeleteBreakpoint

DeleteBreakpoint validates the protocol ID before removing the session's breakpoint.

func (*DebugService) Evaluate

Evaluate preserves the hosted default-frame operation.

func (*DebugService) EvaluateFrame

EvaluateFrame evaluates in a stopped frame and converts the resulting debugger value.

func (*DebugService) FrameLocals

FrameLocals converts variables from the requested stopped frame.

func (*DebugService) Frames

Frames converts stopped-debugger frames, rejecting unrepresentable runtime values.

func (*DebugService) Locals

Locals preserves the hosted default-frame operation.

func (*DebugService) Pause

Pause requests interruption; WatchDebug reports the resulting state transition.

func (*DebugService) ReleaseDebugSession

ReleaseDebugSession reclaims a debugger through its logical connection.

func (*DebugService) ReplaceBreakpoints

ReplaceBreakpoints projects one source-wide atomic publication.

func (*DebugService) RunCommand

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

SetBreakpoint validates protocol locations and options before installing a breakpoint.

func (*DebugService) Start

Start acknowledges an initial debugger resume; WatchDebug carries later stops.

func (*DebugService) StepIn

StepIn dispatches a step-in command; WatchDebug carries its result.

func (*DebugService) StepOut

StepOut dispatches a step-out command; WatchDebug carries its result.

func (*DebugService) StepOver

StepOver dispatches a step-over command; WatchDebug carries its result.

func (*DebugService) Terminate

Terminate stops the debugger while retaining its handle until explicit release.

func (*DebugService) Variables

Variables validates a protocol reference before expanding and converting its children.

func (*DebugService) WatchDebug

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

CancelExecution requests cancellation without waiting for the run to settle.

func (*ExecutionService) Execute

Execute starts a plan run with decoded options and returns its initial protocol snapshot.

func (*ExecutionService) ReleaseExecution

ReleaseExecution cancels and reclaims the run through its logical connection.

func (*ExecutionService) RunSession

RunSession starts a run on a durable session and returns its execution handle.

func (*ExecutionService) WatchExecution

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

ClosePlan releases hosted plan resources without closing its returned children.

func (*PlanService) Compile

Compile decodes source and options into a connection-owned normal plan.

func (*PlanService) CompileDebug

CompileDebug decodes source and options into a connection-owned debuggable plan.

func (*PlanService) ReleasePlan

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

CloseConnection tears down the logical connection identified by the request.

func (*RuntimeService) Connect

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 New

func New(runtime api.Runtime, info Handshake, connections *core.ConnectionRegistry) *Server

New composes RPC services over the caller's runtime and logical connection registry.

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

CreateSession applies decoded options to a durable session under the requested plan.

func (*SessionService) ReleaseSession

ReleaseSession reclaims a durable session through its logical connection.

Jump to

Keyboard shortcuts

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