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:
AbstractCirc
is a view of a circuit.AbstractCircBuilder
knows how to build anAbstractCirc
.
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§
- Abstract
Circ 🔒Mgr - Abstract implementation for circuit management.
- Circ
Build 🔒Plan - Wrapper type to represent the state between planning to build a circuit and constructing it.
- Circ
List 🔒 - The inner state of an
AbstractCircMgr
. - Open
Entry 🔒 - An entry for an open circuit held by an
AbstractCircMgr
. - Pending
Entry 🔒 - An entry for an under-construction in-progress circuit tracked by
an
AbstractCircMgr
. - Pending
Request 🔒 - An in-progress circuit request tracked by an
AbstractCircMgr
. - Unused
Timings 🔒 - 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.
- Circ
Provenance 🔒 - Description of how we got a circuit.
- Expiration
Info 🔒 - Enumeration to track the expiration state of a circuit.
- Restriction
Failed
Traits§
- Abstract
Circ 🔒 - Minimal abstract view of a circuit.
- Abstract
Circ 🔒Builder - An object that knows how to build circuits.
- Mockable
Plan 🔒 - 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§
- Pend
Result 🔒 - A result type whose “Ok” value is the Id for a circuit from B.