Add listener closing when the target set has changed.
All checks were successful
CI / build (push) Successful in 22m46s

This commit is contained in:
Fabian Stamm
2023-07-13 11:53:51 +02:00
parent c90a8fff4a
commit 41d10c5c94
10 changed files with 34 additions and 35 deletions

View File

@ -1,9 +1,11 @@
use crate::shutdown::ShutdownReceiver;
use std::sync::Arc;
use tokio::sync::broadcast;
use tokio::sync::RwLock;
pub(crate) struct Listener {
pub(crate) shutdown: ShutdownReceiver,
pub(crate) source: String,
pub(crate) targets: Arc<RwLock<Vec<String>>>,
pub(crate) targets_changed: broadcast::Receiver<()>,
}