View Source K8s.Client.Mint.ConnectionRegistry (k8s v2.4.1)
A registry for open connections. As HTTP/2 allows simultaneous requests, we handle multiple requests with one process. In this case, the registry stores the PID of the HTTPAdapter which is connected according to the given connection details (URI/opts).
HTTP/1 only allows one request per connection at a time. In order to
support simultaneous requests, we need a connection pool. This is where
:poolboy library comes in.
@spec checkin(adapter_pool_t()) :: :ok
HTTPAdapter process from the registry.
If the returned process is an adapter pool, an adapter is checked out from the pool and a map with both PIDs is returned.
If the returned process is an adapter process, a map with its PID and
nil is returned.
Returns a specification to start this module under a supervisor.