Skip to main content

seed_resolver

Function seed_resolver 

Source
pub fn seed_resolver(
    seeds: &[SocketAddr],
) -> (Arc<ClusterResolver>, Vec<String>)
Expand description

Builds a ClusterResolver pre-seeded with a synthetic dial label per seed address and returns it alongside those labels (in seed order).

The resolver is returned as a concrete Arc<ClusterResolver> so the caller can both hand it to the scheduler as a Resolver and keep registering learned peer names on it; as_resolver performs the trait-object coercion.