bee_gossip/
lib.rs

1// Copyright 2020-2021 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4//! Allows peers in the same IOTA network to exchange gossip messages with each other.
5
6#![cfg_attr(doc_cfg, feature(doc_cfg))]
7#![warn(missing_docs)]
8
9mod alias;
10mod config;
11mod error;
12mod init;
13mod network;
14mod peer;
15mod service;
16mod swarm;
17
18#[cfg(test)]
19mod tests;
20
21// Always exported
22// Exported only with "full" feature flag.
23#[cfg(feature = "full")]
24#[doc(inline)]
25pub use libp2p_core::identity::{
26    ed25519::{Keypair, SecretKey},
27    PublicKey,
28};
29#[doc(inline)]
30pub use libp2p_core::{
31    multiaddr::{Multiaddr, Protocol},
32    PeerId,
33};
34
35pub use self::peer::info::{PeerInfo, PeerRelation};
36#[cfg(feature = "full")]
37pub use self::{
38    config::{NetworkConfig, NetworkConfigBuilder},
39    error::Error,
40    init::{integrated, standalone},
41    network::{host::integrated::NetworkHost, origin::Origin},
42    service::{
43        command::{Command, NetworkCommandSender},
44        event::{Event, NetworkEventReceiver},
45        host::integrated::ServiceHost,
46    },
47    swarm::protocols::iota_gossip::{GossipReceiver, GossipSender},
48};