pub struct ClientConfig {
pub address: Vec<String>,
pub proto: Vec<String>,
pub descriptor_set: Option<String>,
pub tls: Option<ClientTlsConfig>,
pub deadline: Option<Duration>,
pub retries: Option<RetryConfig>,
}Expand description
Configuration for one named upstream gRPC client ([grpc.clients.<name>]).
Each client is self-contained: its own proto contracts build its own descriptor pool (so two upstreams may declare same-named messages without colliding), its own endpoint address(es), TLS to the upstream, and call policy (deadline/retries).
Fields§
§address: Vec<String>Upstream address(es), host:port. A single string or a list; multiple
addresses enable client-side round-robin load balancing (phase 88 §1.4).
proto: Vec<String>Proto contracts for THIS upstream (files or directories, scanned
recursively). Builds this client’s descriptor pool via the same path as the
server side (build_descriptor_pool). Imports resolve automatically.
descriptor_set: Option<String>Optional prebuilt FileDescriptorSet bundle merged into this client’s pool
(same role as the server’s descriptor_set — resolve Any/extra types).
tls: Option<ClientTlsConfig>TLS/mTLS to the upstream. Distinct from the server listener’s TLS.
deadline: Option<Duration>Default per-call deadline. A call may override it; if neither is set the call has no client-imposed deadline (the worker still blocks — document).
retries: Option<RetryConfig>Retry policy for transient/network failures (never for a business status).
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§impl Debug for ClientConfig
impl Debug for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfig
impl<'de> Deserialize<'de> for ClientConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
T in a tonic::Request