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:
AbstractTunnelis a view of a tunnel.AbstractTunnelBuilderknows how to build anAbstractCirc.
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ยง
- Abstract
Tunnel ๐Mgr - Abstract implementation for tunnel management.
- Expiration
Parameters ๐ - Settings to determine when circuits are expired.
- Open
Entry ๐ - An entry for an open tunnel held by an
AbstractTunnelMgr. - Pending
Entry ๐ - An entry for an under-construction in-progress tunnel tracked by
an
AbstractTunnelMgr. - Pending
Request ๐ - An in-progress tunnel request tracked by an
AbstractTunnelMgr. - Tunnel
Build ๐Plan - Wrapper type to represent the state between planning to build a tunnel and constructing it.
- Tunnel
List ๐ - The inner state of an
AbstractTunnelMgr. - Unused
Timings ๐ - 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.
- Expiration
Info ๐ - Enumeration to track the expiration state of a tunnel.
- Restriction
Failed - An error returned when we cannot apply circuit restriction.
- Should
Expire ๐ - When should a tunnel expire?
- Tunnel
Provenance ๐ - Description of how we got a tunnel.
Traitsยง
- Abstract
Tunnel ๐ - Minimal abstract view of a tunnel.
- Abstract
Tunnel ๐Builder - An object that knows how to build tunnels.
- Mockable
Plan ๐ - A plan for an
AbstractCircBuilderthat can maybe be mutated by tests.
Functionsยง
- spawn_
expiration_ ๐task - Spawn an expiration task that expires a tunnel at given instant.
Type Aliasesยง
- Pend
Result ๐ - A result type whose โOkโ value is the Id for a tunnel from B.
- PtrWeak
Hash ๐Set - Alias to force use of RandomState, regardless of features enabled in
weak_tables.