HTTP.HTTP2.PoolKey (http_runtime v0.16.1)

View Source

Builds a safe, comparable identity for a reusable HTTP/2 connection.

The returned key contains only normalized values and digests. In particular, TLS files are identified by their contents and metadata, never by path alone, and callback or opaque option values are conservatively marked non-reusable.

Summary

Functions

Builds a pool identity from a request, compiled (or compilable) profile and the protocol actually negotiated by the transport.

Types

key()

@type key() :: map()

result()

@type result() :: {:ok, key()} | {:ok, :non_reusable, key()} | {:error, term()}

Functions

build(request, profile, actual_protocol, opts \\ [])

@spec build(
  HTTP.Request.t(),
  HTTP.HTTP2.WireProfile.t() | map() | atom() | binary(),
  atom() | binary(),
  keyword()
) :: result()

Builds a pool identity from a request, compiled (or compilable) profile and the protocol actually negotiated by the transport.

opts may provide transport routing values such as :unix_socket and is merged over the request transport options. Supported protocols are :h2 and :h2c; unsupported route/proxy options are rejected explicitly.