pub struct ClientConfig {
pub addr: String,
pub connect_timeout: Duration,
pub read_timeout: Duration,
pub write_timeout: Duration,
pub keepalive_interval: Duration,
pub tls: Option<TlsClientConfig>,
}Expand description
Configuration for the LANCE client
Fields§
§addr: StringServer address to connect to (supports both IP:port and hostname:port)
connect_timeout: DurationTimeout for establishing connections
read_timeout: DurationTimeout for read operations
write_timeout: DurationTimeout for write operations
keepalive_interval: DurationInterval between keepalive messages
tls: Option<TlsClientConfig>Optional TLS configuration for encrypted connections
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn new(addr: impl Into<String>) -> Self
pub fn new(addr: impl Into<String>) -> Self
Create a new client configuration with the specified server address
The address can be either an IP:port (e.g., “127.0.0.1:1992”) or a hostname:port (e.g., “lance.example.com:1992”). DNS resolution is performed asynchronously during connection.
Sourcepub fn with_tls(self, tls_config: TlsClientConfig) -> Self
pub fn with_tls(self, tls_config: TlsClientConfig) -> Self
Enables TLS for this configuration so clients can satisfy Architecture §14’s production security guidance when traversing untrusted networks.
§Arguments
tls_config- Certificates and trust roots passed through tolnc-network’s TLS connector.
§Returns
Self- Updated config allowing fluent builder-style chaining.
Sourcepub fn is_tls_enabled(&self) -> bool
pub fn is_tls_enabled(&self) -> bool
Check if TLS is enabled
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 ClientConfig
impl Debug for ClientConfig
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
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> 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