Module mgr

Source
Expand description

Abstract code to manage a set of circuits.

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

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

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

Modules§

streams 🔒
Stream utilities to help implement AbstractCircMgr

Structs§

AbstractCircMgr 🔒
Abstract implementation for circuit management.
CircBuildPlan 🔒
Wrapper type to represent the state between planning to build a circuit and constructing it.
CircList 🔒
The inner state of an AbstractCircMgr.
OpenEntry 🔒
An entry for an open circuit held by an AbstractCircMgr.
PendingEntry 🔒
An entry for an under-construction in-progress circuit tracked by an AbstractCircMgr.
PendingRequest 🔒
An in-progress circuit request tracked by an AbstractCircMgr.
UnusedTimings 🔒
Timing information for circuits that have been built but never used.

Enums§

Action 🔒
An action to take in order to satisfy a request for a circuit.
CircProvenance 🔒
Description of how we got a circuit.
ExpirationInfo 🔒
Enumeration to track the expiration state of a circuit.
RestrictionFailed

Traits§

AbstractCirc 🔒
Minimal abstract view of a circuit.
AbstractCircBuilder 🔒
An object that knows how to build circuits.
MockablePlan 🔒
A plan for an AbstractCircBuilder that can maybe be mutated by tests.

Functions§

spawn_expiration_task 🔒
Spawn an expiration task that expires a circuit at given instant.

Type Aliases§

PendResult 🔒
A result type whose “Ok” value is the Id for a circuit from B.