mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-19 01:36:15 +00:00
Keep network status & ring in a tokio::sync::watch
advantages - reads don't prevent preparing writes - can be followed from other parts of the system by cloning the receiver
This commit is contained in:
+2
-2
@@ -59,8 +59,8 @@ async fn handler(
|
||||
let resp = err_to_msg(match &msg {
|
||||
Message::Ping(ping) => sys.handle_ping(&addr, ping).await,
|
||||
|
||||
Message::PullStatus => sys.handle_pull_status().await,
|
||||
Message::PullConfig => sys.handle_pull_config().await,
|
||||
Message::PullStatus => sys.handle_pull_status(),
|
||||
Message::PullConfig => sys.handle_pull_config(),
|
||||
Message::AdvertiseNodesUp(adv) => sys.handle_advertise_nodes_up(adv).await,
|
||||
Message::AdvertiseConfig(adv) => sys.handle_advertise_config(adv).await,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user