Skip to main content

Module guard

Module guard 

Source
Expand description

Code to represent its single guard node and track its status.

Re-exportsΒ§

use tor_basic_utils::retry::RetryDelay; πŸ”’
use itertools::Itertools; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Deserialize; πŸ”’
use serde::Serialize; πŸ”’
use serde::Serialize; πŸ”’
use std::collections::HashMap; πŸ”’
use std::net::SocketAddr; πŸ”’
use tracing::info; πŸ”’
use tracing::trace; πŸ”’
use tracing::warn; πŸ”’
use web_time_compat::Duration; πŸ”’
use web_time_compat::Instant; πŸ”’
use web_time_compat::InstantExt; πŸ”’
use web_time_compat::SystemTime; πŸ”’
use crate::dirstatus::DirStatus; πŸ”’
use crate::sample::Candidate; πŸ”’
use crate::skew::SkewObservation; πŸ”’
use crate::util::randomize_time; πŸ”’
use crate::ExternalActivity; πŸ”’
use crate::GuardSetSelector; πŸ”’
use crate::GuardUsageKind; πŸ”’
use crate::sample; πŸ”’
use crate::GuardParams; πŸ”’
use crate::GuardRestriction; πŸ”’
use crate::GuardUsage; πŸ”’
use crate::ids::GuardId; πŸ”’
use safelog::Redactable as _; πŸ”’
use tor_basic_utils::onionperf_types::OnionperfEvent; πŸ”’
use tor_basic_utils::onionperf_types::OnionperfGuardStatus; πŸ”’
use tor_linkspec::ChanTarget; πŸ”’
use tor_linkspec::ChannelMethod; πŸ”’
use tor_linkspec::HasAddrs; πŸ”’
use tor_linkspec::HasChanMethod; πŸ”’
use tor_linkspec::HasRelayIds; πŸ”’
use tor_linkspec::PtTarget; πŸ”’
use tor_linkspec::RelayIds; πŸ”’
use tor_persist::Futureproof; πŸ”’
use tor_persist::JsonValue; πŸ”’

StructsΒ§

CircHistory πŸ”’
The recent history of circuit activity on this guard.
CrateId πŸ”’
The name and version of the crate that first picked a potential guard.
Guard πŸ”’
A single guard node, as held by the guard manager.

EnumsΒ§

DisplayRule πŸ”’
What rule do we use when we’re displaying information about a guard?
GuardDisabled πŸ”’
A reason for permanently disabling a guard.
NewlyConfirmed πŸ”’
Wrapper to declare whether a given successful use of a guard is the first successful use of the guard.
Reachable πŸ”’
Tri-state to represent whether a guard is believed to be reachable or not.

ConstantsΒ§

GUARD_DIR_RETRY_FLOOR πŸ”’
Lower bound for delay after get a failure using a guard as a directory cache.

FunctionsΒ§

guard_dirstatus πŸ”’
Return a DirStatus entry for a guard.
retry_schedule πŸ”’
Return a new RetryDelay tracker for a guard.