pub struct HoprBlokliClientConfig {
pub url: Url,
pub dns_override: Option<(IpAddr, Option<u16>)>,
}Expand description
Configuration for creating a blokli_client::BlokliClient via create_blokli_client.
The connector applies its own opinionated defaults for timeouts and reconnection behaviour;
only url and dns_override are caller-controlled.
§Examples
Basic usage — no DNS override:
ⓘ
let client = create_blokli_client(HoprBlokliClientConfig::new(url));With DNS override (useful when system DNS is unavailable):
ⓘ
let client = create_blokli_client(HoprBlokliClientConfig {
url,
dns_override: Some((ip, Some(8545))),
});Fields§
§url: UrlBlokli service URL.
dns_override: Option<(IpAddr, Option<u16>)>Optional DNS override: an IP address (and optional port) to use instead of resolving
Self::url’s host via DNS.
When None (the default) system DNS is used. When set, the connection goes directly to
the given IP, while the original host is kept for the Host header and TLS SNI.
port defaults to the URL’s port when None.
Implementations§
Trait Implementations§
Source§impl Clone for HoprBlokliClientConfig
impl Clone for HoprBlokliClientConfig
Source§fn clone(&self) -> HoprBlokliClientConfig
fn clone(&self) -> HoprBlokliClientConfig
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 HoprBlokliClientConfig
impl Debug for HoprBlokliClientConfig
Source§impl Validate for HoprBlokliClientConfig
impl Validate for HoprBlokliClientConfig
Auto Trait Implementations§
impl Freeze for HoprBlokliClientConfig
impl RefUnwindSafe for HoprBlokliClientConfig
impl Send for HoprBlokliClientConfig
impl Sync for HoprBlokliClientConfig
impl Unpin for HoprBlokliClientConfig
impl UnwindSafe for HoprBlokliClientConfig
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,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more