Struct cocaine::service::locator::Locator [−][src]
pub struct Locator { /* fields omitted */ }
Locator service wrapper.
Methods
impl Locator
[src]
impl Locator
pub fn new(service: Service) -> Self
[src]
pub fn new(service: Service) -> Self
Constructs a new Locator service wrapper using the specified service object.
pub fn resolve(
&self,
name: &str
) -> impl Future<Item = ResolveInfo<SocketAddr>, Error = Error>
[src]
pub fn resolve(
&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();
pub fn routing(
&self,
uuid: &str
) -> impl Stream<Item = HashMap<String, HashRing>, Error = Error>
[src]
pub fn routing(
&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]
impl Clone for Locator
fn clone(&self) -> Locator
[src]
fn clone(&self) -> Locator
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Locator
[src]
impl Debug for Locator