rpc library
Typed Odroe RPC clients, references, transports, and serialization.
Classes
- Client
- The interface for HTTP clients that take care of maintaining persistent connections across multiple requests to the same server.
- Headers
- Case-insensitive, multi-value HTTP headers.
- HttpTransport
- Cross-platform HTTP transport backed by package:http.
- NoServerInput
- Input marker for a server function without arguments.
- RpcClient
- Typed client for generated server-function references.
- RpcModule
- Installs an RPC client into an application context.
- RpcTransport
- Sends RPC requests without coupling the client to an HTTP implementation.
-
SerializationAdapter<
T> - Extends RPC serialization with one tagged domain value.
- Serializer
- Versioned JSON-compatible serializer used by RPC and hydration handoff.
-
ServerFunctionRef<
I, O> - Typed reference to a server function that returns one value.
- ServerRequest
- Platform-neutral incoming request.
- ServerResponse
- Platform-neutral outgoing response with streaming body support.
-
ServerStreamFunctionRef<
I, T> - Typed reference to a server function that returns a stream.
Enums
- HttpMethod
- HTTP methods understood by routes and server functions.
Properties
-
rpcClientKey
→ ContextKey<
RpcClient> -
The application context key used to read the configured RpcClient.
final
Typedefs
-
RpcHeadersProvider
= FutureOr<
Headers> Function() - Creates application-owned headers immediately before one RPC request.
-
ValueDecoder<
T> = T Function(Object? value) -
Converts one decoded wire value to
T. -
ValueEncoder<
T> = Object? Function(T value) - Converts one typed value to a serializer-supported wire value.
Exceptions / Errors
- NotFound
- A not-found control-flow result understood by routes and RPC.
- PayloadTooLargeException
- Raised when a request payload exceeds its configured byte limit.
- Redirect
- A redirect control-flow result understood by routes and RPC.
- RemoteServerException
- Error returned by a remote RPC or HTTP failure.
- RpcCancelledException
- Indicates that the caller cancelled an RPC request.
- RpcProtocolException
- Indicates that a response violated the RPC wire protocol.