Skip to main content

Crate rust_grpc_lib

Crate rust_grpc_lib 

Source
Expand description

Root of the rust-grpc-lib crate.

Declares the public module tree and re-exports the proc-macro entry points from grpc-macro so consumers never need a direct dependency on that crate.

§Modules

ModuleFeature gatePurpose
authauth (default)JWT interceptors, validation layer, token sources
build_supportbuildProto code-generation helpers for build.rs
poolalwaysProcess-wide lazily-connected channel pool

§Re-exported macros

ItemFeature gateWhat it generates
GrpcClientauth (default)from_endpoint_with_provider on tonic client structs
GrpcNoAuthClientunauthenticatedfrom_endpoint (no-auth) on tonic client structs
keycloak_authenticated_serviceauth (default)Role-checking guards on impl Trait for Type blocks

See each module and the grpc-macro crate for full documentation.

Modules§

auth
JWT interceptors, validation layer, and re-exports from rust-auth-lib.
build_support
Build-time helpers for compiling the bundled .proto definitions into Rust.
pool
Process-wide gRPC channel pool.

Attribute Macros§

keycloak_authenticated_service
Attribute macro applied to impl Trait for Type blocks that injects Keycloak role-checking guards into methods annotated with #[roles(...)].

Derive Macros§

GrpcClient
Derive macro that generates from_endpoint_with_provider on a tonic client struct, wiring it into pool::get_channel with JWT auth.
GrpcNoAuthClient
Derive macro that generates from_endpoint (no-auth) on a tonic client struct. Intended for test harnesses only; requires the unauthenticated feature.