Documentation
¶
Overview ¶
Package client implements the Universal Ferret API over a caller-owned gRPC connection. New returns api.Runtime; plans, sessions, output, options, and debugger values use github.com/MontFerret/api and its canonical subpackages.
The construction context bounds the handshake, while the returned runtime owns the logical connection lifetime. Runtime.Run invokes the hosted runtime directly. Plans create durable sessions whose runs are sequential. Callers close resources explicitly; Close uses bounded detached cleanup and never closes the physical transport.
Wire resource IDs, RPC clients, and watch streams remain private. Immediate remote failures expose Error, terminal failures use pkg/failure.Failure, and ErrClosed and ErrExecutionCancelled distinguish local closure and remote cancellation from the caller's context errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrClosed reports an operation attempted through a closed runtime or resource // handle. Closing begins when the first Close call commits teardown. ErrClosed = errors.New("Wire client or resource is closed") // ErrExecutionCancelled reports that a remote execution reached its cancelled // terminal state. It is distinct from cancellation of the caller's context. ErrExecutionCancelled = errors.New("remote execution was cancelled") )
Functions ¶
func New ¶
New opens a logical Wire connection and exposes it through the canonical api.Runtime interface. The context bounds the handshake; cancelling it after construction does not close the runtime. Close releases the logical connection and its resources with bounded detached cleanup, leaving the caller-owned transport open. On failure, New returns a nil interface.
Types ¶
type Error ¶
type Error struct {
Category failure.Category
Message string
Diagnostics diagnostics.Diagnostics
// contains filtered or unexported fields
}
Error is a decoded Wire RPC failure. Category is set only when the server transmitted an ErrorDetail; transport-native statuses leave it zero. Internal transport causes remain available through Unwrap without exposing protocol resource identifiers.
Source Files
¶
- allocation_context.go
- allocation_error.go
- client.go
- compile.go
- compile_options.go
- debug.go
- debug_command_result.go
- debug_conversion.go
- debug_events.go
- debug_inspection.go
- diagnostics.go
- doc.go
- errors.go
- execution.go
- execution_conversion.go
- execution_events.go
- lifecycle.go
- params.go
- plan.go
- remote_debug_session.go
- remote_plan.go
- remote_session.go
- runtime.go
- runtime_allocation.go
- runtime_plan_options.go
- runtime_session_options.go
- runtime_transport.go
- session_handle.go