Struct tokio_zookeeper::ZooKeeperBuilder [−][src]
pub struct ZooKeeperBuilder { /* fields omitted */ }
Builder that allows customizing options for ZooKeeper connections.
Methods
impl ZooKeeperBuilder
[src]
impl ZooKeeperBuilder
pub fn connect(
self,
addr: &SocketAddr
) -> impl Future<Item = (ZooKeeper, impl Stream<Item = WatchedEvent, Error = ()>), Error = Error>
[src]
pub fn connect(
self,
addr: &SocketAddr
) -> impl Future<Item = (ZooKeeper, impl Stream<Item = WatchedEvent, Error = ()>), Error = Error>
Connect to a ZooKeeper server instance at the given address.
Session establishment is asynchronous. This constructor will initiate connection to the
server and return immediately - potentially (usually) before the session is fully
established. When the session is established, a ZooKeeper
instance is returned, along
with a "watcher" that will provide notifications of any changes in state.
If the connection to the server fails, the client will automatically try to re-connect. Only if re-connection fails is an error returned to the client. Requests that are in-flight during a disconnect may fail and have to be retried.
pub fn set_timeout(&mut self, t: Duration)
[src]
pub fn set_timeout(&mut self, t: Duration)
Set the ZooKeeper session expiry timeout.
The default timeout is dictated by the server.
pub fn set_logger(&mut self, l: Logger)
[src]
pub fn set_logger(&mut self, l: Logger)
Set the logger that should be used internally in the ZooKeeper client.
By default, all logging is disabled. See also the slog
documentation.
Trait Implementations
impl Debug for ZooKeeperBuilder
[src]
impl Debug for ZooKeeperBuilder
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for ZooKeeperBuilder
[src]
impl Clone for ZooKeeperBuilder
fn clone(&self) -> ZooKeeperBuilder
[src]
fn clone(&self) -> ZooKeeperBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Default for ZooKeeperBuilder
[src]
impl Default for ZooKeeperBuilder
Auto Trait Implementations
impl Send for ZooKeeperBuilder
impl Send for ZooKeeperBuilder
impl Sync for ZooKeeperBuilder
impl Sync for ZooKeeperBuilder