[][src]Trait cueball::resolver::Resolver

pub trait Resolver: Send + 'static {
    fn run(&mut self, s: Sender<BackendMsg>);
}

Cueball backend resolver

Resolvers identify the available backends (i.e. nodes) providing a service and relay information about those backends to the connection pool. Resolvers should also inform the connection pool when a backend is no longer available so that the pool can rebalance the connections on the remaining backends.

Required methods

fn run(&mut self, s: Sender<BackendMsg>)

Start the operation of the resolver. Begin querying for backends and notifying the connection pool using the provided Sender.

This function is expected to block while the resolver is running, and return if the receiving end of the channel is closed, or if the Resolver encounters an unrecoverable error of any sort. Thus, callers can shut down the resolver by closing the receiving end of the channel.

Loading content...

Implementors

Loading content...