Struct cocaine::service::locator::Locator
[−]
[src]
pub struct Locator { /* fields omitted */ }
Locator service wrapper.
Methods
impl Locator
[src]
fn new(service: Service) -> Self
[src]
Constructs a new Locator service wrapper using the specified service object.
fn resolve(
&self,
name: &str
) -> impl Future<Item = ResolveInfo<SocketAddr>, Error = Error>
[src]
&self,
name: &str
) -> impl Future<Item = ResolveInfo<SocketAddr>, Error = Error>
Resolves a service with the specified name, returning its endpoints, version and methods.
Examples
use cocaine::{Core, Service}; use cocaine::service::Locator; let mut core = Core::new().unwrap(); let locator = Locator::new(Service::new("locator", &core.handle())); let future = locator.resolve("node"); let info = core.run(future).unwrap();
fn routing(
&self,
uuid: &str
) -> impl Stream<Item = HashMap<String, HashRing>, Error = Error>
[src]
&self,
uuid: &str
) -> impl Stream<Item = HashMap<String, HashRing>, Error = Error>
Subscribes for routing groups changes using an unique identifier.
Trait Implementations
impl Clone for Locator
[src]
fn clone(&self) -> Locator
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more