Snakepit.Pool.Worker.StarterRegistry (snakepit v0.1.2)

Registry for worker starter supervisors.

This registry provides a clean separation between worker processes and their starter supervisors, making debugging and process tracking easier.

Worker starters are registered with their worker_id as the key, allowing for easy lookup and management of individual starter supervisors.

Summary

Functions

Returns the child spec for the starter registry.

Gets the PID for a worker starter supervisor.

Lists all registered worker starter IDs.

Counts the number of registered worker starters.

Checks if a worker starter is registered.

Returns a via tuple for registering/looking up a worker starter supervisor.

Functions

child_spec(opts)

Returns the child spec for the starter registry.

get_starter_pid(worker_id)

Gets the PID for a worker starter supervisor.

list_starters()

Lists all registered worker starter IDs.

starter_count()

Counts the number of registered worker starters.

starter_exists?(worker_id)

Checks if a worker starter is registered.

via_tuple(worker_id)

Returns a via tuple for registering/looking up a worker starter supervisor.

Examples

iex> Snakepit.Pool.Worker.StarterRegistry.via_tuple("worker_123")
{:via, Registry, {Snakepit.Pool.Worker.StarterRegistry, "worker_123"}}