Skip to main content

Module mgr

Module mgr 

Source
Expand description

Abstract code to manage a set of tunnels which has underlying circuit(s).

This module implements the real logic for deciding when and how to launch tunnels, and for which tunnels to hand out in response to which requests.

For testing and abstraction purposes, this module does not actually know anything about tunnels per se. Instead, everything is handled using a set of traits that are internal to this crate:

Using these traits, the AbstractTunnelMgr object manages a set of tunnels , launching them as necessary, and keeping track of the restrictions on their use.

Modulesยง

streams ๐Ÿ”’
Stream utilities to help implement AbstractCircMgr

Structsยง

AbstractTunnelMgr ๐Ÿ”’
Abstract implementation for tunnel management.
ExpirationParameters ๐Ÿ”’
Settings to determine when circuits are expired.
OpenEntry ๐Ÿ”’
An entry for an open tunnel held by an AbstractTunnelMgr.
PendingEntry ๐Ÿ”’
An entry for an under-construction in-progress tunnel tracked by an AbstractTunnelMgr.
PendingRequest ๐Ÿ”’
An in-progress tunnel request tracked by an AbstractTunnelMgr.
TunnelBuildPlan ๐Ÿ”’
Wrapper type to represent the state between planning to build a tunnel and constructing it.
TunnelList ๐Ÿ”’
The inner state of an AbstractTunnelMgr.
UnusedTimings ๐Ÿ”’
Timing information for tunnels that have been built but never used.

Enumsยง

Action ๐Ÿ”’
An action to take in order to satisfy a request for a tunnel.
ExpirationInfo ๐Ÿ”’
Enumeration to track the expiration state of a tunnel.
RestrictionFailed
An error returned when we cannot apply circuit restriction.
ShouldExpire ๐Ÿ”’
When should a tunnel expire?
TunnelProvenance ๐Ÿ”’
Description of how we got a tunnel.

Traitsยง

AbstractTunnel ๐Ÿ”’
Minimal abstract view of a tunnel.
AbstractTunnelBuilder ๐Ÿ”’
An object that knows how to build tunnels.
MockablePlan ๐Ÿ”’
A plan for an AbstractCircBuilder that can maybe be mutated by tests.

Functionsยง

spawn_expiration_task ๐Ÿ”’
Spawn an expiration task that expires a tunnel at given instant.

Type Aliasesยง

PendResult ๐Ÿ”’
A result type whose โ€œOkโ€ value is the Id for a tunnel from B.
PtrWeakHashSet ๐Ÿ”’
Alias to force use of RandomState, regardless of features enabled in weak_tables.