Skip to main content

Module mgr

Module mgr 

Source
Expand description

Abstract implementation of a channel manager

Re-exportsยง

use crate::factory::BootstrapReporter; ๐Ÿ”’
use crate::mgr::state::ChannelForTarget; ๐Ÿ”’
use crate::mgr::state::PendingChannelHandle; ๐Ÿ”’
use crate::ChanProvenance; ๐Ÿ”’
use crate::ChannelConfig; ๐Ÿ”’
use crate::ChannelUsage; ๐Ÿ”’
use crate::Dormancy; ๐Ÿ”’
use crate::Error; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use async_trait::async_trait; ๐Ÿ”’
use futures::future::Shared; ๐Ÿ”’
use oneshot_fused_workaround as oneshot; ๐Ÿ”’
use std::result::Result as StdResult; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use tor_error::error_report; ๐Ÿ”’
use tor_error::internal; ๐Ÿ”’
use tor_linkspec::HasChanMethod; ๐Ÿ”’
use tor_linkspec::HasRelayIds; ๐Ÿ”’
use tor_netdir::params::NetParameters; ๐Ÿ”’
use tor_proto::channel::kist::KistParams; ๐Ÿ”’
use tor_proto::channel::params::ChannelPaddingInstructionsUpdates; ๐Ÿ”’
use tor_proto::memquota::ChannelAccount; ๐Ÿ”’
use tor_proto::memquota::SpecificAccount as _; ๐Ÿ”’
use tor_proto::memquota::ToplevelAccount; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use tracing::trace; ๐Ÿ”’
use safelog::Sensitive; ๐Ÿ”’
use std::net::SocketAddr; ๐Ÿ”’
use std::num::NonZero; ๐Ÿ”’
use tor_async_utils::bw_pool::BandwidthPool; ๐Ÿ”’
use tor_async_utils::global_rate_limit::GlobalRateLimitedConn; ๐Ÿ”’
use tor_proto::RelayChannelAuthMaterial; ๐Ÿ”’

Modulesยง

select ๐Ÿ”’
Logic for filtering and selecting channels in order to find suitable channels for a target.
state ๐Ÿ”’
Simple implementation for the internal map state of a ChanMgr.

Structsยง

AbstractChanMgr ๐Ÿ”’
A type- and network-agnostic implementation for ChanMgr.
ChanMgrConfig
This is the configuration for a ChanMgr given to the constructor.
ChanMgrMetrics ๐Ÿ”’
Struct to hold all the metrics counters / gauges / histograms we use.
ChannelBandwidthPools ๐Ÿ”’
Global read and write bandwidth pools shared by all channels.
PendingLaunchGuard ๐Ÿ”’
Keeps a pending launch entry and its waiters in sync.

Enumsยง

Action ๐Ÿ”’
Possible actions that weโ€™ll decide to take when asked for a channel.

Constantsยง

BW_MAX_CHUNK ๐Ÿ”’
Maximum number of bytes a single channel requests from the bandwidth pool.

Traitsยง

AbstractChannel ๐Ÿ”’
Trait to describe as much of a Channel as AbstractChanMgr needs to use.
AbstractChannelFactory ๐Ÿ”’
Trait to describe how channels-like objects are created.

Type Aliasesยง

Pending ๐Ÿ”’
Type alias for a future that we wait on to see when a pending channel is done or failed.
Sending ๐Ÿ”’
Type alias for the sender we notify when we complete a channel (or fail to complete it).