SuperWorker.Supervisor.Group (SuperWorker v0.5.0)
View SourceDocumentation for SuperWorker.Supervisor.Group.
Summary
Functions
A internal function. Add a worker to the group.
Check, validate and convert key-value pairs to struct.
Get all workers from the group.
Get worker from the group.
A internal function. Restart a worker in the group.
Check if worker exists in the group.
Types
Functions
@spec add_worker(t(), SuperWorker.Supervisor.Worker.t()) :: worker_operation_result()
A internal function. Add a worker to the group.
@spec check_options([keyword()]) :: {:ok, %SuperWorker.Supervisor.Group{ id: term(), restart_strategy: term(), supervisor: term(), table: term() }} | {:error, atom() | {atom(), any()}}
@spec check_options([atom() | keyword()]) :: check_options_result()
Check, validate and convert key-value pairs to struct.
@spec count_workers(%SuperWorker.Supervisor.Group{ id: term(), restart_strategy: term(), supervisor: term(), table: term() }) :: non_neg_integer()
@spec count_workers(t()) :: non_neg_integer()
@spec get_all_workers(t()) :: {:ok, [SuperWorker.Supervisor.Worker.t()]}
Get all workers from the group.
@spec get_worker(t(), any()) :: {:ok, SuperWorker.Supervisor.Worker.t()} | {:error, atom()}
Get worker from the group.
@spec restart_worker(t(), SuperWorker.Supervisor.Worker.t() | any()) :: worker_operation_result()
A internal function. Restart a worker in the group.
Check if worker exists in the group.