View Source SuperWorker.Supervisor.Chain (SuperWorker v0.0.7)
Documentation for SuperWorker.Supervisor.Chain
.
Summary
Types
@type t() :: %SuperWorker.Supervisor.Chain{ data_table: atom(), finished_callback: nil | {:fun, fun()} | {module(), atom(), [any()]}, first_worker_id: any(), id: any(), partition: atom(), queue_length: non_neg_integer(), restart_strategy: atom(), send_type: :broadcast | :random | :partition | :round_robin, supervisor: atom() }
Functions
@spec add_worker(t(), SuperWorker.Supervisor.Worker.t()) :: {:error, :already_exists} | {:ok, t()}
@spec get_all_workers(t()) :: {:ok, [SuperWorker.Supervisor.Worker.t()]}
@spec get_worker(t(), any()) :: {:error, :worker_not_found} | {:ok, SuperWorker.Supervisor.Worker.t()}