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

Common interface for protocol-specific pool implementations.

Both `Quiver.Pool.HTTP1` and `Quiver.Pool.HTTP2` implement this behaviour,
allowing `Quiver.Pool.Manager` to dispatch requests without knowing the
underlying protocol.

# `headers`

```elixir
@type headers() :: Quiver.Conn.headers()
```

# `method`

```elixir
@type method() :: Quiver.Conn.method()
```

# `request`

```elixir
@callback request(
  pool :: pid(),
  method(),
  path :: String.t(),
  headers(),
  body :: iodata() | nil,
  opts :: keyword()
) :: {:ok, Quiver.Response.t()} | {:error, term()}
```

# `stats`

```elixir
@callback stats(pool :: pid()) :: %{
  :idle =&gt; non_neg_integer(),
  :active =&gt; non_neg_integer(),
  :queued =&gt; non_neg_integer(),
  optional(:connections) =&gt; non_neg_integer()
}
```

# `stream_request`

```elixir
@callback stream_request(
  pool :: pid(),
  method(),
  path :: String.t(),
  headers(),
  body :: iodata() | nil,
  opts :: keyword()
) :: {:ok, Quiver.StreamResponse.t()} | {:error, term()}
```

---

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