Skip to main content

Module daemon

Module daemon 

Source
Expand description

Implement background tasks used by guard managers.

These background tasks keep a weak reference to the GuardMgrInner and use that to notice when they should shut down.

Re-exportsยง

use crate::GuardMgrInner; ๐Ÿ”’
use crate::pending::GuardStatus; ๐Ÿ”’
use crate::pending::RequestId; ๐Ÿ”’
use futures::channel::mpsc; ๐Ÿ”’
use futures::stream::StreamExt; ๐Ÿ”’
use tor_proto::ClockSkew; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use std::sync::Mutex; ๐Ÿ”’
use std::sync::Weak; ๐Ÿ”’

Enumsยง

Msg ๐Ÿ”’
A message sent by to the report_status_events() task.

Functionsยง

keep_bridge_descs_updated ๐Ÿ”’
Background task to keep a guard manager up-to-date with a given bridge descriptor provider.
keep_netdir_updated ๐Ÿ”’
Background task to keep a guard manager up-to-date with a given network directory provider.
report_status_events ๐Ÿ”’
Background task: wait for messages about guard statuses, and tell a guard manager about them. Runs indefinitely.
run_periodic ๐Ÿ”’
Background task to run periodic events on the guard manager.