Module tor_circmgr::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§

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§

Traits§

  • AbstractCirc πŸ”’
    Minimal abstract view of a circuit.
  • An object that knows how to build circuits.
  • AbstractSpec πŸ”’
    Represents restrictions on circuit usage.
  • MockablePlan πŸ”’
    A plan for an AbstractCircBuilder that can maybe be mutated by tests.

Functions§

  • Default implementation of AbstractSpec::find_supported; provided as a separate function so it can be used in overridden implementations.
  • 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.