Skip to main content

Module pool

Module pool 

Source
Expand description

Bounded, isolation-keyed connection reuse (spec 020, 3.5, I-2).

Off by default. A host that enables it constructs one ConnectionPool under a PoolPolicy and hands it to the clients that may share it. Every bound is hard: total connections, connections per origin, concurrent streams per connection (one: HTTP/1.1 carries a single request at a time, so nothing is multiplexed), idle connections, idle lifetime, absolute lifetime and uses per connection. Exhaustion queues or refuses as the policy declares, never past the attempt budget.

A connection is reused only under the exact PoolKey it was opened under: the digest of every isolation member of KeyMaterial (endpoint class and authority, protocol, proxy route, TLS posture, credential identity digest, privacy options, principal posture, scope and reference digest, key schema and adapter binding). Unknown or noncanonical key material makes a key that never reuses. Pool state is runtime state only: never core state, never replay input. Connections are never moved between keys; a stale connection is evicted, never transparently replaced mid-exchange.

Structs§

ConnectionPool
Bounded connections shared by every client given the same pool.
Exhausted
The pool could not provide a connection within the policy and budget.
KeyMaterial
Every isolation member of a pooled connection (spec 020, 3.5). Only digests of secrets: the credential identity is a digest, the principal reference is its evidence digest.
Lease
A checked-out connection, or a reserved place for a fresh one. Dropped without ConnectionPool::release, it closes and frees its place.
PoolKey
A connection’s isolation key and origin.
PoolPolicy
The hard bounds of a pool (spec 020, 3.5). Every bound is positive; max_streams is 1 because the HTTP/1.1 binding cannot multiplex.
PoolStats
Pool counters, for hosts and tests.

Enums§

OnExhaustion
What a policy declares when the pool has no room.
PoolBinding
The pool posture of an adapter binding: the policy and the key schema it isolates by. disabled, the default, opens a fresh connection per exchange, as spec 009 does.

Constants§

POOL_KEY_SCHEMA
The schema of the isolation key’s canonical material.

Traits§

Pooled
A connection the pool can tell is closed.

Functions§

credential_identity
The digest of a credential’s identity: never the credential.