Skip to main content

Crate hyperlane_plugin_rpc

Crate hyperlane_plugin_rpc 

Source
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 RpcRouter dispatch and RpcHook HTTP endpoint handling.
RpcError
JSON-RPC 2.0 error object returned inside RpcResponse.
RpcHook
Opt-in ServerHook dispatching HTTP POST requests on the configured JSON-RPC endpoint.
RpcPlugin
Process-wide RpcPlugin registry holding RpcConfig and an immutable RpcRouter.
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 Send future returned by an async JSON-RPC 2.0 method handler.
RpcHandler
Thread-safe async JSON-RPC 2.0 method handler callback.