Sprites.ControlPool (Sprites v0.1.0)
View SourcePool of Sprites.ControlConn processes for a single sprite.
Manages connection lifecycle with checkout/checkin semantics and automatic draining when the pool grows too large.
Summary
Functions
Returns a connection to the pool.
Checks out a control connection from the pool.
Returns a specification to start this module under a supervisor.
Closes all connections in the pool and stops the GenServer.
Starts a control pool (unlinked) for the given sprite.
Starts a control pool for the given sprite.
Functions
Returns a connection to the pool.
Checks out a control connection from the pool.
Returns an idle connection or creates a new one.
Returns {:error, {:control_not_supported, 404}} if the server doesn't support control mode.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(pid()) :: :ok
Closes all connections in the pool and stops the GenServer.
@spec start(keyword()) :: GenServer.on_start()
Starts a control pool (unlinked) for the given sprite.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a control pool for the given sprite.