Skip to main content

Crate hyperlane_plugin_grpc

Crate hyperlane_plugin_grpc 

Source
Expand description

hyperlane-plugin-grpc

High-concurrency gRPC over HTTP/2 framing, bounded compression, canonical status codes, timeout parsing, XxHash3_64 service routing, extensible interceptors, and an opt-in ServerHook for Hyperlane.

Structs§

GrpcConfig
Configuration governing gRPC message size limits and response compression.
GrpcError
Structured gRPC error carrying a canonical GrpcStatus and message.
GrpcFrame
Decoded 5-byte length-prefixed gRPC message frame.
GrpcHook
Opt-in ServerHook dispatching gRPC POST requests with Content-Type: application/grpc*.
GrpcPlugin
Process-wide GrpcPlugin registry holding GrpcConfig and GrpcRouter.
GrpcRouter
Thread-safe registry mapping /package.Service/Method paths to unary async handlers.

Enums§

GrpcStatus
Canonical gRPC status codes (0..=16).

Constants§

DEFAULT_GRPC_MAX_MESSAGE_SIZE
Default maximum decoded gRPC message size (4 MiB).
GRPC_CONTENT_TYPE
Canonical gRPC Content-Type header value.
GRPC_ENCODING_HEADER
Request/response header identifying the gRPC payload compression coding.
GRPC_FRAME_HEADER_LEN
Length of the 5-byte gRPC Length-Prefixed-Message header.
GRPC_MESSAGE_HEADER
Response header carrying the percent-encoded gRPC error message.
GRPC_STATUS_HEADER
Response header carrying the numeric gRPC status code.
GRPC_TIMEOUT_HEADER
Request header carrying the client-supplied RPC timeout budget.

Traits§

GrpcInterceptor
Pluggable interceptor invoked before each gRPC unary service dispatch.

Functions§

is_grpc_content_type
Reports whether a Content-Type header value matches application/grpc (or +proto/+json).
parse_grpc_timeout
Parses a gRPC grpc-timeout header value (<1..8 digits><H|M|S|m|u|n>) into a Duration.
percent_encode_grpc_message
Percent-encodes a gRPC status message per the gRPC over HTTP/2 specification.

Type Aliases§

GrpcFuture
Boxed Send future returned by an async unary gRPC service handler.
GrpcHandler
Thread-safe async unary gRPC service handler receiving decoded request payload bytes.