Expand description
hyperlane-plugin-rpc
High-concurrency JSON-RPC 2.0 server plugin for Hyperlane with XxHash3_64
async method routing, concurrent batch dispatch, extensible interceptors,
notification handling, and an opt-in ServerHook.
Structs§
- RpcConfig
- Configuration for
RpcRouterdispatch andRpcHookHTTP endpoint handling. - RpcError
- JSON-RPC 2.0 error object returned inside
RpcResponse. - RpcHook
- Opt-in
ServerHookdispatching HTTPPOSTrequests on the configured JSON-RPC endpoint. - RpcPlugin
- Process-wide
RpcPluginregistry holdingRpcConfigand an immutableRpcRouter. - RpcRequest
- JSON-RPC 2.0 incoming request envelope.
- RpcResponse
- JSON-RPC 2.0 outgoing response envelope.
- RpcRouter
- Thread-safe registry mapping JSON-RPC method names to async handlers with zero-allocation lookup.
Enums§
- RpcId
- JSON-RPC 2.0 request/response correlation identifier.
Constants§
- DEFAULT_
RPC_ ENDPOINT - Default HTTP endpoint path handled by
crate::RpcHook. - DEFAULT_
RPC_ MAX_ BATCH_ SIZE - Default maximum number of items permitted in one JSON-RPC batch array.
- DEFAULT_
RPC_ MAX_ BODY_ SIZE - Default maximum request body size accepted by
crate::RpcHook(1 MiB). - JSONRPC_
VERSION - JSON-RPC 2.0 protocol version literal.
- RPC_
INTERNAL_ ERROR - JSON-RPC 2.0 Internal Error code.
- RPC_
INVALID_ PARAMS - JSON-RPC 2.0 Invalid Params code.
- RPC_
INVALID_ REQUEST - JSON-RPC 2.0 Invalid Request code.
- RPC_
METHOD_ NOT_ FOUND - JSON-RPC 2.0 Method Not Found code.
- RPC_
PARSE_ ERROR - JSON-RPC 2.0 Parse Error code.
Traits§
- RpcInterceptor
- Pluggable interceptor invoked before each JSON-RPC 2.0 method dispatch.
Type Aliases§
- RpcFuture
- Boxed
Sendfuture returned by an async JSON-RPC 2.0 method handler. - RpcHandler
- Thread-safe async JSON-RPC 2.0 method handler callback.