pub struct DistributorClientConfig {
pub base_url: Option<String>,
pub environment_id: DistributorEnvironmentId,
pub tenant: TenantCtx,
pub auth_token: Option<String>,
pub extra_headers: Option<HashMap<String, String>>,
pub request_timeout: Option<Duration>,
}Expand description
Configuration for distributor clients.
NOTE: base_url, auth_token, and header fields are used when the
http-runtime feature is enabled. Without that feature, the WIT client is
the primary implementation.
Fields§
§base_url: Option<String>§environment_id: DistributorEnvironmentId§tenant: TenantCtx§auth_token: Option<String>§extra_headers: Option<HashMap<String, String>>§request_timeout: Option<Duration>Implementations§
Source§impl DistributorClientConfig
impl DistributorClientConfig
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
Sourcepub fn from_greentic(cfg: &GreenticConfig, tenant: TenantCtx) -> Self
pub fn from_greentic(cfg: &GreenticConfig, tenant: TenantCtx) -> Self
Builds a distributor client config from a resolved GreenticConfig and tenant context.
This keeps greentic-config resolution in the host while allowing consumers to map the shared schema into the distributor client.
Trait Implementations§
Source§impl Clone for DistributorClientConfig
impl Clone for DistributorClientConfig
Source§fn clone(&self) -> DistributorClientConfig
fn clone(&self) -> DistributorClientConfig
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 DistributorClientConfig
impl Debug for DistributorClientConfig
Source§impl PartialEq for DistributorClientConfig
impl PartialEq for DistributorClientConfig
impl Eq for DistributorClientConfig
impl StructuralPartialEq for DistributorClientConfig
Auto Trait Implementations§
impl Freeze for DistributorClientConfig
impl RefUnwindSafe for DistributorClientConfig
impl Send for DistributorClientConfig
impl Sync for DistributorClientConfig
impl Unpin for DistributorClientConfig
impl UnsafeUnpin for DistributorClientConfig
impl UnwindSafe for DistributorClientConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> 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