Packages

SuperWorker is a powerful Elixir library for working with supervisors and background jobs. It provides a much simpler approach than traditional supervisors. This library is currently under development and is unstable, so it is not recommended for production use.

Current section

Files

Jump to
super_worker lib worker worker_callback.ex
Raw

lib/worker/worker_callback.ex

defmodule SuperWorker.Worker do
@callback start(config :: map, state :: map) :: {:ok, map} | {:error, reason :: any}
@callback start_link(config :: map, state :: map) :: {:ok, map} | {:error, reason :: any}
@callback init(config :: map) :: {:ok, map} | {:error, reason :: any}
@callback error(config :: map, state :: map) :: {:ok, map} | {:error, reason :: any} | {:stop, reason :: any}
@callback spec(opts :: list()) :: {:ok, map} | {:error, reason :: any}
@callback terminate(config :: map, state :: map) :: {:ok, map} | {:error, reason :: any}
end