jhn_elixir v0.1.3 JhnElixir.Supervisor behaviour

Link to this section Summary

Link to this section Types

Link to this type

child_desc()

child_desc() :: [
  {:undefined | id(), :undefined | :restarting | pid(), :worker | :supervisor,
   [module()] | :dynamic}
]
Link to this type

child_spec()

child_spec() :: module() | {module(), term()} | :supervisor.child_spec()
Link to this type

debug()

debug() :: [:trace | :log | :statistics | {:log_to_file, Path.t()}]
Link to this type

id()

id() :: pid() | term()
Link to this type

link()

link() :: :link | :nolink
Link to this type

name()

name() :: atom() | {:global, term()} | {:via, module(), term()}
Link to this type

on_child_start()

on_child_start() ::
  {:ok, pid()} | {:ok, pid(), term()} | {:error, start_child_error()}
Link to this type

on_start()

on_start() ::
  {:ok, pid()} | :ignore | {:error, {:already_started, pid()} | term()}
Link to this type

option()

option() ::
  {:name, name()}
  | {:link, link()}
  | {:debug, debug()}
  | {:timeout, timeout()}
  | {:spawn_opt, Process.spawn_opt()}
  | {:hibernate_after, timeout()}
Link to this type

options()

options() :: [option()]
Link to this type

server()

server() :: pid() | name() | {atom(), node()}
Link to this type

start_child_error()

start_child_error() :: :already_present | {:already_present, term()} | term()

Link to this section Functions

Link to this function

child_spec(spec, overrides)

child_spec(child_spec(), keyword()) :: child_spec()
Link to this function

delete_child(server, id)

delete_child(server(), id :: id()) :: :ok | {:error, term()}
Link to this function

get_childspec(server, id)

get_childspec(server(), id :: id()) :: {:ok, child_spec()} | {:error, term()}
Link to this function

init(spec)

init(tuple()) :: {:ok, tuple()}
Link to this function

init(children, options)

init([child_spec()], keyword()) :: on_init()
Link to this function

restart_child(server, id)

restart_child(server(), id :: id()) :: :ok | {:error, term()}
Link to this function

start(spec, options \\ [])

start({module(), any()} | [child_spec()], options()) :: on_start()
Link to this function

start_child(server, args)

start_child(server(), child_spec()) :: on_child_start()
Link to this function

stop(server, reason \\ :normal, timeout \\ :infinity)

stop(server(), reason :: term(), timeout()) :: :ok
Link to this function

terminate_child(server, id)

terminate_child(server(), id :: id()) :: :ok | {:error, term()}
Link to this function

which_children(server)

which_children(server()) :: child_desc()

Link to this section Callbacks

Link to this callback

init(init_arg)

(optional)
init(init_arg :: term()) :: on_init()