# `HTTP.HTTP2.PoolKey`
[🔗](https://github.com/gsmlg-dev/http_fetch/blob/v1.0.0-rc.9/apps/http_pool/lib/http/http2/pool_key.ex#L1)

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.

# `key`

```elixir
@type key() :: map()
```

# `result`

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

# `build`

```elixir
@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.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
