Skip to main content

Module grpc

Module grpc 

Source
Expand description

The gRPC network transport.

Modules§

api
The gRPC service and message types generated from proto/rpc.proto.
pool
A pool of reusable gRPC transport channels.
transport
Transport-level configuration and channel construction for gRPC.

Structs§

GrpcClient
A gRPC client for communicating with a validator node.
GrpcNodeProvider
A node provider that creates gRPC clients backed by a shared connection pool.
GrpcPrometheusMetricsMiddlewareLayer
A Tower layer that records Prometheus metrics for gRPC requests.
GrpcPrometheusMetricsMiddlewareService
The Tower service produced by GrpcPrometheusMetricsMiddlewareLayer.
GrpcServer
A gRPC server exposing a validator’s worker as a network service.
GrpcServerHandle
A handle to a running GrpcServer task.

Enums§

GrpcError
GrpcProtoConversionError

Constants§

ERROR_TYPE_LABEL
Prometheus label for the error variant name, e.g. "WorkerError::UnexpectedBlockHeight".
GRPC_CHUNKED_MESSAGE_FILL_LIMIT
Limit of gRPC message size up to which we will try to populate with data when estimating. We leave 30% of buffer for the rest of the message and potential underestimation.
GRPC_MAX_MESSAGE_SIZE
The maximum gRPC message size, in bytes.
METHOD_NAME_LABEL
Prometheus label for the gRPC method name.
TRAFFIC_TYPE_LABEL
Prometheus label for distinguishing organic vs synthetic (benchmark) traffic.

Traits§

GrpcProxyable
Types which are proxyable and expose the appropriate methods to be handled by the GrpcProxy

Functions§

extract_grpc_method_name
Extracts the gRPC method name from a request URI path.