Struct strymon_coordinator::Builder
[−]
[src]
pub struct Builder { /* fields omitted */ }
Creates a new coordinator instance.
Examples
use strymon_coordinator::Builder; let mut coord = Builder::default(); coord .hostname("localhost".to_string()) .port(9189); coord .run() .expect("failed to run coordinator");
Methods
impl Builder
[src]
pub fn hostname(&mut self, hostname: String) -> &mut Self
[src]
Sets the externally reachable hostname of this machine (default: inferred).
pub fn port(&mut self, port: u16) -> &mut Self
[src]
Sets the port on which the coordinator service is exposed (default: 9189
).
impl Builder
[src]
pub fn run(self) -> Result<()>
[src]
Starts and runs a new coordinator instance.
This blocks the current thread until the coordinator service shuts down, which currently only happens if an error occurs.
Internally, this first creates a new
CoordinatorRPC
and a
CatalogRPC
service, instantiates an
empty Catalog
and then dispatches requests to be handled
by request handler
logic.