pub struct RegistryServer { /* private fields */ }Expand description
A service registry.
ⓘ
App::new()
.plugin(RegistryServer::new().peers(vec!["http://registry-b:8761".into()]))
.run()
.awaitImplementations§
Source§impl RegistryServer
impl RegistryServer
pub fn new() -> RegistryServer
Sourcepub fn using(self, registry: Registry) -> RegistryServer
pub fn using(self, registry: Registry) -> RegistryServer
Share the registry with the rest of the application — a dashboard, or a gateway running in the same process.
pub fn registry(&self) -> &Registry
Sourcepub fn peers(self, peers: Peers) -> RegistryServer
pub fn peers(self, peers: Peers) -> RegistryServer
The other registry nodes. Pass every node including this one and use
Peers::excluding — or pass only the others; both work.
Sourcepub fn dashboard(self, at: Option<&str>) -> RegistryServer
pub fn dashboard(self, at: Option<&str>) -> RegistryServer
Move the dashboard, or take it away.
A registry’s dashboard is an internal tool and this plugin puts no
authentication in front of it. It lists every host and port you run,
which is a map of the estate for anybody who reaches it. Mount it behind
whatever the application already uses, or pass None and read the
registry through Registry from a page of your own — which is what
the auth-kit dashboard does.
Trait Implementations§
Source§impl Default for RegistryServer
impl Default for RegistryServer
Auto Trait Implementations§
impl !RefUnwindSafe for RegistryServer
impl !UnwindSafe for RegistryServer
impl Freeze for RegistryServer
impl Send for RegistryServer
impl Sync for RegistryServer
impl Unpin for RegistryServer
impl UnsafeUnpin for RegistryServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more