pub struct GrpcProductionAdapter { /* private fields */ }Available on crate feature
router-grpc only.Expand description
Production gRPC adapter with full protobuf support
Features:
- Full protobuf encoding/decoding
- Unary RPCs
- Server streaming
- Client streaming
- Bidirectional streaming
- gRPC reflection
- HTTP/2 transport
Implementations§
Source§impl GrpcProductionAdapter
impl GrpcProductionAdapter
Sourcepub fn service_name(&self) -> &str
pub fn service_name(&self) -> &str
Get the service name
Sourcepub fn server_builder() -> Server
pub fn server_builder() -> Server
Create a gRPC server builder
Sourcepub fn status_from_code(code: Code, message: impl Into<String>) -> Status
pub fn status_from_code(code: Code, message: impl Into<String>) -> Status
Convert a gRPC status code to Status
Sourcepub fn enable_reflection() -> Builder<'static>
pub fn enable_reflection() -> Builder<'static>
Create a reflection server for gRPC service discovery
This enables clients to discover services and their methods at runtime. Useful for tools like grpcurl, grpcui, and Postman.
Returns the builder that can be used to construct the reflection server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GrpcProductionAdapter
impl RefUnwindSafe for GrpcProductionAdapter
impl Send for GrpcProductionAdapter
impl Sync for GrpcProductionAdapter
impl Unpin for GrpcProductionAdapter
impl UnwindSafe for GrpcProductionAdapter
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request