diff --git a/aquadoggo/src/api/api.rs b/aquadoggo/src/api/api.rs index 5e697ac2a..d5bced544 100644 --- a/aquadoggo/src/api/api.rs +++ b/aquadoggo/src/api/api.rs @@ -7,9 +7,13 @@ use crate::api::{migrate, LockFile}; use crate::bus::{ServiceMessage, ServiceSender}; use crate::context::Context; +/// Node events which can be interesting for clients, for example when peers connect or disconnect. #[derive(Debug, Clone)] pub enum NodeEvent { + /// A peer connected to our node. This can be a direct or relayed connection. PeerConnected, + + /// A peer disconnected from our node. PeerDisconnected, } diff --git a/aquadoggo/src/lib.rs b/aquadoggo/src/lib.rs index 8452e926b..969123de6 100644 --- a/aquadoggo/src/lib.rs +++ b/aquadoggo/src/lib.rs @@ -34,7 +34,7 @@ mod tests; use log::{info, log_enabled, Level}; -pub use crate::api::{ConfigFile, LockFile}; +pub use crate::api::{ConfigFile, LockFile, NodeEvent}; pub use crate::config::{AllowList, Configuration}; pub use crate::network::{NetworkConfiguration, Transport}; pub use node::Node;