Nostr.RelayPool (nostr_access v0.3.4)
View SourceManages a pool of connections to a single relay.
Summary
Functions
Checks in a connection after use.
Checks out a connection with a free slot.
Returns a specification to start this module under a supervisor.
Starts a relay pool for the given URI.
Functions
Checks in a connection after use.
@spec checkout_conn( pid(), keyword() ) :: {:ok, pid()} | {:error, :no_slot} | {:error, {:connection_failed, term()}}
Checks out a connection with a free slot.
Options
:force_new- when true, open a new WebSocket if under the pool limit instead of reusing an existing connection (default:false)
Returns a specification to start this module under a supervisor.
See Supervisor.
Starts a relay pool for the given URI.