Struct tokio_nsq::NSQConfigShared[][src]

pub struct NSQConfigShared { /* fields omitted */ }

Configuration options shared by both produces and consumers

Implementations

impl NSQConfigShared[src]

pub fn new() -> Self[src]

Construct a configuration with sane defaults.

pub fn set_backoff_max_wait(self, duration: Duration) -> Self[src]

The maximum reconnect backoff wait. Defaults to 60 seconds.

pub fn set_backoff_healthy_after(self, duration: Duration) -> Self[src]

How long a connection should be healthy before backoff is reset. Defaults to 45 seconds.

pub fn set_compression(self, compression: NSQConfigSharedCompression) -> Self[src]

Connection compression options. Defaults to no compression.

pub fn set_credentials(self, credentials: Vec<u8>) -> Self[src]

Credentials to send NSQD if authentication is requried. Defaults to no credentials.

pub fn set_tls(self, tls: NSQConfigSharedTLS) -> Self[src]

Connection encryption options. Defaults to no encryption

pub fn set_client_id<S: Into<String>>(self, client_id: S) -> Self[src]

A string used to identify an NSQ client. Defaults to anonymous identity.

pub fn set_write_timeout(self, duration: Option<Duration>) -> Self[src]

Timeout for socket write operations. Defaults to 10 seconds. Setting the duration to None disables write timeouts.

pub fn set_read_timeout(self, duration: Option<Duration>) -> Self[src]

Timeout for socket read operations. Defaults to 60 seconds. Must be greater than the heartbeat interval. Setting the duration to None disables read timeouts.

pub fn set_hostname<S: Into<String>>(self, hostname: S) -> Self[src]

The hostname sent to NSQD. Defaults to the hostname provided by the operating system.

pub fn set_user_agent<S: Into<String>>(self, user_agent: S) -> Self[src]

The user agent sent to NSQD. Defaults to “tokio_nsq/package_version”.

pub fn set_flush_interval(self, duration: Duration) -> Self[src]

How often the TCP write buffer should be flushed. An outgoing write buffer substantially increases network performance, particularly in the context of compression. Defaults to every 250 milliseconds.

Trait Implementations

impl Clone for NSQConfigShared[src]

impl Default for NSQConfigShared[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,