View Source SuperWorker.Worker behaviour (SuperWorker v0.0.7)

Summary

Callbacks

error(config, state)

@callback error(config :: map(), state :: map()) ::
  {:ok, map()} | {:error, reason :: any()} | {:stop, reason :: any()}

init(config)

@callback init(config :: map()) :: {:ok, map()} | {:error, reason :: any()}

spec(opts)

@callback spec(opts :: list()) :: {:ok, map()} | {:error, reason :: any()}

start(config, state)

@callback start(config :: map(), state :: map()) ::
  {:ok, map()} | {:error, reason :: any()}

start_link(config, state)

@callback start_link(config :: map(), state :: map()) ::
  {:ok, map()} | {:error, reason :: any()}

terminate(config, state)

@callback terminate(config :: map(), state :: map()) ::
  {:ok, map()} | {:error, reason :: any()}