View Source SuperWorker.Supervisor.Group (SuperWorker v0.0.4)

Documentation 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

t()

@type t() :: %SuperWorker.Supervisor.Group{
  data_table: atom(),
  id: any(),
  partition: atom(),
  restart_strategy: atom(),
  supervisor: atom()
}

Functions

add_worker(group, worker)

A internal function. Add a worker to the group.

broadcast(group, message)

check_options(opts)

@spec check_options([keyword()]) :: {:ok, term()} | {:error, atom() | {atom(), any()}}

Check, validate and convert key-value pairs to struct.

count_workers(group)

get_all_workers(group)

Get all workers from the group.

get_worker(group, worker_id)

Get worker from the group.

kill_all_workers(group, reason \\ :kill)

kill_worker(group, worker, reason)

remove_worker(group, worker_id)

restart_worker(group, worker_id)

A internal function. Restart a worker in the group.

worker_exists?(group, worker_id)

Check if worker exists in the group.