Skip to main content

Module pool

Module pool 

Source
Expand description

An internal pool object that we use to implement HsCircPool.

Re-exportsยง

use web_time_compat::Duration; ๐Ÿ”’
use web_time_compat::Instant; ๐Ÿ”’
use crate::AbstractTunnel; ๐Ÿ”’
use crate::hspool::HsCircStem; ๐Ÿ”’
use crate::hspool::HsCircStemKind; ๐Ÿ”’
use rand::Rng; ๐Ÿ”’
use tor_basic_utils::RngExt as _; ๐Ÿ”’

Structsยง

CircsToLaunch ๐Ÿ”’
The circuits we need to launch.
ForLaunch ๐Ÿ”’
A type of circuit we would like to launch.
HsCircPrefs ๐Ÿ”’
Preferences for what kind of circuit to select from the pool.
Pool ๐Ÿ”’
A collection of circuits used to fulfil onion-service-related requests.

Constantsยง

DEFAULT_GUARDED_STEM_TARGET ๐Ÿ”’
Our default (and minimum) target GUARDED pool size.
DEFAULT_NAIVE_STEM_TARGET ๐Ÿ”’
Our default (and minimum) target NAIVE pool size.
MAX_GUARDED_STEM_TARGET ๐Ÿ”’
Our maximum target GUARDED pool size. We will never let our GUARDED target grow above this value.
MAX_NAIVE_STEM_TARGET ๐Ÿ”’
Our maximum target NAIVE pool size. We will never let our NAIVE target grow above this value.

Functionsยง

random_idx_where ๐Ÿ”’
Helper: find a random item elt in slice such that predicate(elt) is true. Return the index of that item.