pub struct GossipNode { /* private fields */ }Implementations§
Source§impl GossipNode
impl GossipNode
Sourcepub async fn start(
config: GossipConfig,
msg_tx: Sender<GossipMessage>,
) -> Result<Self, Box<dyn Error + Send + Sync>>
pub async fn start( config: GossipConfig, msg_tx: Sender<GossipMessage>, ) -> Result<Self, Box<dyn Error + Send + Sync>>
Start the gossip node: bind UDP, initialize foca, join seeds.
Sourcepub async fn announce_generation(
&self,
producer_id: String,
issuer_key_hash: Vec<u8>,
epoch: u64,
manifest_digest: [u8; 32],
bundle_url: Option<String>,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn announce_generation( &self, producer_id: String, issuer_key_hash: Vec<u8>, epoch: u64, manifest_digest: [u8; 32], bundle_url: Option<String>, ) -> Result<(), Box<dyn Error + Send + Sync>>
Broadcast a generation announcement to the gossip mesh.
Sourcepub async fn announce_urgent_revocation(
&self,
producer_id: String,
issuer_key_hash: Vec<u8>,
epoch: u64,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn announce_urgent_revocation( &self, producer_id: String, issuer_key_hash: Vec<u8>, epoch: u64, ) -> Result<(), Box<dyn Error + Send + Sync>>
Broadcast an urgent revocation notice.
pub fn config(&self) -> &GossipConfig
Sourcepub async fn members(&self) -> Vec<MemberInfo>
pub async fn members(&self) -> Vec<MemberInfo>
Snapshot the current cluster membership, including the local node.
foca tracks only peers — the local node never appears in its own
member list — so we append self (always Alive from its own vantage)
to give the fleet view a complete roster.
Sourcepub async fn record_generation(&self, msg: &GossipMessage)
pub async fn record_generation(&self, msg: &GossipMessage)
Fold a received generation announcement into the generation table.
Only advances a (node, scope) row when the incoming epoch is newer,
mirroring the anti-rollback stance of the serving path — a delayed or
replayed lower-epoch announcement must not appear to regress a peer.
last_seen is refreshed on every observation regardless, so liveness
tracking stays accurate even when the epoch is unchanged.
Sourcepub async fn generations(&self) -> Vec<GenRecord>
pub async fn generations(&self) -> Vec<GenRecord>
Snapshot all known per-(node, scope) generation records.