Dynamic supervisor for per-client TURN allocation GenServers.
What problem this solves
Each successful Allocate spawns a dedicated process for relay state. A
:simple_one_for_one supervisor with :temporary restarts lets allocations
start and stop independently without restarting siblings when one client leaves.
Internal note
Child module is typically Allocate.Client.
RFCs
- RFC 5766 (allocation lifetime and teardown)
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts a new allocation worker under this supervisor.
Starts the allocation supervisor.
Terminates an allocation worker pid.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Starts a new allocation worker under this supervisor.
Parameters
id- allocation transaction id / store keylistener- client%ClientSocket{}tuple5- client five-tuplelifetime- initial lifetime in seconds
Starts the allocation supervisor.
Parameters
alloc- allocation worker module (typicallyAllocate.Client)
Terminates an allocation worker pid.