p2panda-net 0.6.0

Data-type-agnostic p2p networking, discovery, gossip and local-first sync
Documentation
// SPDX-License-Identifier: MIT OR Apache-2.0

use std::collections::HashSet;

use p2panda_core::Topic;

use crate::NodeId;

#[derive(Clone, Debug, PartialEq, Eq)]
pub enum GossipEvent {
    Joined {
        topic: Topic,
        nodes: HashSet<NodeId>,
    },
    NeighbourUp {
        node: NodeId,
        topic: Topic,
    },
    NeighbourDown {
        node: NodeId,
        topic: Topic,
    },
    Left {
        topic: Topic,
    },
}