Struct etcd_client::ConnectOptions
source · pub struct ConnectOptions { /* private fields */ }
Expand description
Options for Connect
operation.
Implementations§
source§impl ConnectOptions
impl ConnectOptions
sourcepub fn with_user(
self,
name: impl Into<String>,
password: impl Into<String>
) -> Self
pub fn with_user( self, name: impl Into<String>, password: impl Into<String> ) -> Self
name is the identifier for the distributed shared lock to be acquired.
sourcepub fn with_tls(self, tls: TlsOptions) -> Self
Available on crate feature tls
only.
pub fn with_tls(self, tls: TlsOptions) -> Self
tls
only.Sets TLS options.
Notes that this function have to work with HTTPS
URLs.
sourcepub fn with_keep_alive(self, interval: Duration, timeout: Duration) -> Self
pub fn with_keep_alive(self, interval: Duration, timeout: Duration) -> Self
Enable HTTP2 keep-alive with interval
and timeout
.
sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Apply a timeout to each request.
sourcepub fn with_connect_timeout(self, timeout: Duration) -> Self
pub fn with_connect_timeout(self, timeout: Duration) -> Self
Apply a timeout to connecting to the endpoint.
sourcepub fn with_keep_alive_while_idle(self, enabled: bool) -> Self
pub fn with_keep_alive_while_idle(self, enabled: bool) -> Self
Whether send keep alive pings even there are no active requests.
If disabled, keep-alive pings are only sent while there are opened request/response streams.
If enabled, pings are also sent when no streams are active.
NOTE: Some implementations of gRPC server may send GOAWAY if there are too many pings.
This would be useful if you meet some error like too many pings
.
Trait Implementations§
source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
Returns a copy 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 ConnectOptions
impl Debug for ConnectOptions
source§impl Default for ConnectOptions
impl Default for ConnectOptions
source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnwindSafe for ConnectOptions
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> 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