Skip to content

Commit

Permalink
Expose NodeEvent to public API
Browse files Browse the repository at this point in the history
  • Loading branch information
adzialocha committed Jun 26, 2024
1 parent 70220a2 commit aa887e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions aquadoggo/src/api/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
2 changes: 1 addition & 1 deletion aquadoggo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aa887e4

Please sign in to comment.