hyperlane-plugin-grpc 23.2.0

A gRPC over HTTP/2 server plugin for the Hyperlane framework with length-prefixed framing, bounded decompression, gRPC status codes, timeout parsing, service routing, and an opt-in ServerHook.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

/// Pluggable interceptor invoked before each gRPC unary service dispatch.
pub trait GrpcInterceptor: Send + Sync + 'static {
    /// Inspects or rejects an incoming gRPC call before the service handler runs.
    ///
    /// # Arguments
    ///
    /// - `&str` - Full gRPC method path (`/package.Service/Method`).
    ///
    /// # Returns
    ///
    /// - `Result<(), GrpcError>` - `Ok(())` to continue dispatch, or `Err(GrpcError)` to short-circuit.
    fn before_call(&self, path: &str) -> Result<(), GrpcError>;
}