Minga.Extension.RuntimeSupervisor (Minga v0.1.0)

Copy Markdown View Source

Local DynamicSupervisor for one extension's runtime implementation.

Child mechanics live here. Every child spec is forced to :temporary; the sibling Instance is the only process that interprets the declaration's original restart policy.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns this supervisor's sole local runtime child, bounded by the caller's deadline.

Starts one temporary runtime child.

Starts the runtime supervisor for one extension root.

Terminates the currently owned runtime child.

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

local_child(supervisor, timeout \\ 5000)

@spec local_child(GenServer.server(), timeout()) ::
  {:ok, pid()} | :empty | {:error, term()}

Returns this supervisor's sole local runtime child, bounded by the caller's deadline.

start_child(supervisor, child_spec)

@spec start_child(GenServer.server(), Supervisor.child_spec()) ::
  {:ok, pid()} | {:error, term()}

Starts one temporary runtime child.

start_link(opts)

@spec start_link(keyword()) :: Supervisor.on_start()

Starts the runtime supervisor for one extension root.

terminate_child(supervisor, pid)

@spec terminate_child(GenServer.server(), pid()) :: :ok | {:error, term()}

Terminates the currently owned runtime child.