Provider lifecycle evidence and transferable cancellation authority.
Create a handle before connecting and pass {handle, lease} under
ex_ssl: [lifecycle: ...]. A successful cancel accepts retirement; only a
confirmed await receipt establishes local resource cleanup. Control deadlines
are finite absolute monotonic milliseconds. Handles contain no cancellation
authority and remain readable after the provider exits.
Summary
Functions
Reads authenticated native connection failure evidence before establishment.
Returns the fixed outer and inner scalar descriptors of one pair reservation.
Reserves both independent lifecycle obligations before nested TLS performs I/O.
Offers a new cancellation controller while preserving the provider's current socket owner.
Reads authenticated fatal setup-phase evidence separately from resource cleanup.
Observes exact live resource counts within one finite absolute deadline.
Functions
@spec connect_failure(SSL.Lifecycle.Handle.t()) ::
{:ok, %{phase: :connect}} | :unknown
Reads authenticated native connection failure evidence before establishment.
Only the original allocator's observed failure, committed with its original
resource ownership and deadline, establishes this phase. A generic setup error,
cancellation, timeout or missing publication returns :unknown. The evidence
survives provider exit and does not establish cleanup; use await/2 separately.
@spec layers({SSL.Lifecycle.Pair.Handle.t(), SSL.Lifecycle.Pair.Lease.t()}) :: {:ok, map()} | {:error, atom()}
Returns the fixed outer and inner scalar descriptors of one pair reservation.
@spec new_pair(keyword()) :: {:ok, SSL.Lifecycle.Pair.Handle.t(), SSL.Lifecycle.Pair.Lease.t()} | {:error, term()}
Reserves both independent lifecycle obligations before nested TLS performs I/O.
Use layers/1 to give each scalar descriptor to its own TLS connection. Pair
status and await require both receipts; a layer receipt never proves outer TCP
cleanup. No extra data process or physical socket is allocated by the pair.
Offers a new cancellation controller while preserving the provider's current socket owner.
@spec setup_failure(SSL.Lifecycle.Handle.t()) ::
{:ok, %{phase: :tls_setup}} | :unknown
Reads authenticated fatal setup-phase evidence separately from resource cleanup.
A proven result means the original Connection accepted ServerHello and committed
a fatal setup failure within its original deadline. The fixed result survives
provider exit. Missing or uncommitted evidence returns :unknown; cancellation,
timeout, and a successful handshake alone do not establish this phase.
Use await/2 separately to establish local resource cleanup.
@spec status( SSL.Lifecycle.Handle.t() | SSL.Lifecycle.Pair.Handle.t(), {:abs_ms, integer()} ) :: term()
Observes exact live resource counts within one finite absolute deadline.