pub struct ProxyState {
pub service_name: String,
pub grpc_upstream: String,
pub grpc_channel: Channel,
pub maintenance_mode: bool,
pub maintenance_exempt: Vec<String>,
pub maintenance_message: String,
pub forwarded_headers: Vec<String>,
pub metrics_namespace: String,
pub metrics_classes: Vec<MetricsClassConfig>,
}Expand description
Shared state for all proxy handlers.
Fields§
§service_name: StringService name from config.
grpc_upstream: StringgRPC upstream address.
grpc_channel: ChannelLazy gRPC channel to upstream service.
maintenance_mode: boolMaintenance mode active.
maintenance_exempt: Vec<String>Maintenance exempt path patterns.
maintenance_message: StringMaintenance message.
forwarded_headers: Vec<String>Headers to forward from HTTP to gRPC.
metrics_namespace: StringMetrics namespace (derived from service name).
metrics_classes: Vec<MetricsClassConfig>Path class patterns for metrics.
Trait Implementations§
Source§impl Clone for ProxyState
impl Clone for ProxyState
Source§fn clone(&self) -> ProxyState
fn clone(&self) -> ProxyState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyState
impl Debug for ProxyState
Source§impl TranscodeState for ProxyState
impl TranscodeState for ProxyState
Source§fn grpc_channel(&self) -> Channel
fn grpc_channel(&self) -> Channel
Lazy gRPC channel to upstream service.
Source§fn forwarded_headers(&self) -> &[String]
fn forwarded_headers(&self) -> &[String]
Headers to forward from HTTP to gRPC metadata.
Auto Trait Implementations§
impl Freeze for ProxyState
impl !RefUnwindSafe for ProxyState
impl Send for ProxyState
impl Sync for ProxyState
impl Unpin for ProxyState
impl UnsafeUnpin for ProxyState
impl !UnwindSafe for ProxyState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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