Minga.Extension.Instance.Artifact (Minga v0.1.0)

Copy Markdown View Source

Immutable current-generation artifact view and normalized runtime child policy.

Summary

Functions

Builds an artifact while preserving the declaration's original restart policy.

Returns whether an exit is a crash for public lifecycle projection.

Returns whether a runtime exit should be replaced.

Types

restart()

@type restart() :: :permanent | :transient | :temporary

t()

@type t() :: %Minga.Extension.Instance.Artifact{
  child_spec: Supervisor.child_spec(),
  manifest: Minga.Extension.Manifest.t(),
  module: module(),
  owned_modules: [module()],
  restart: restart(),
  source: {:extension, atom()}
}

Functions

build(name, module, manifest, owned_modules, config)

@spec build(atom(), module(), Minga.Extension.Manifest.t(), [module()], keyword()) ::
  {:ok, t()} | {:error, term()}

Builds an artifact while preserving the declaration's original restart policy.

crash?(arg1)

@spec crash?(term()) :: boolean()

Returns whether an exit is a crash for public lifecycle projection.

restart?(arg1, arg2)

@spec restart?(restart(), term()) :: boolean()

Returns whether a runtime exit should be replaced.