Skip to main content

Module rendezvous

Module rendezvous 

Source
Expand description

The rendezvous provider: discovery across segments multicast cannot cross. Every Majordomus server is a rendezvous — the mesh.register capability accepts a signed envelope and answers with the envelopes it holds — so a “mothership” is any node the declaration points at, not a different program and not a canonical database. The local registry stays the only truth; a rendezvous is one more source of observations, its failure stretches the retry and stops nothing else, and its answers are signed end-to-end: a poisoned rendezvous can withhold nodes, it cannot invent one.

use majordomus_cli::mesh::rendezvous::RendezvousProvider;
use majordomus_cli::mesh::provider::{MeshProvider, MeshProviderState};

// Before the manager starts it, a provider is stopped; with no endpoints declared
// there is nothing to register with, and starting it says so.
let provider = RendezvousProvider::new(vec![], 60);
assert_eq!(provider.id(), "rendezvous");
assert_eq!(provider.status().state, MeshProviderState::Stopped);

Structs§

RegisterAnswer
What a registration answers: whether the envelope was accepted, and the candidates the rendezvous holds. Defined here beside the client; the capability re-exports it.
RendezvousProvider
The rendezvous provider: the declared endpoints, one registration thread each, and the counters their status reports. Constructed by the manager from the declaration.

Constants§

REGISTER_PATH
The HTTP route mesh.register is served on. Named once, here: the capability declaration and this client read the same word.