# `Quiver.Pool.HTTP2`
[🔗](https://github.com/edlontech/quiver/blob/main/lib/quiver/pool/http2.ex#L1)

HTTP/2 connection pool coordinator.

A gen_state_machine per origin that routes concurrent callers to available
stream slots across one or more HTTP/2 connection workers. Opens new connections
when all existing ones are at max_concurrent_streams. Queues callers when the
connection count is also at the maximum.

The coordinator uses a two-phase caller model:
1. Caller sends a gen_statem call to the coordinator (checkout phase).
2. Coordinator forwards the request to a connection worker via message.
3. The connection worker replies directly to the caller's `from` reference.

# `t`

```elixir
@type t() :: %Quiver.Pool.HTTP2{
  checkout_timeout: pos_integer(),
  config: map() | nil,
  connections: map(),
  max_connections: pos_integer(),
  origin: term(),
  waiting: :queue.queue()
}
```

# `connected`

# `idle`

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the HTTP/2 pool coordinator.

---

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