Minga.Extension.Entry (Minga v0.1.0)

Copy Markdown View Source

Data structure representing a declared extension in the registry.

Each entry tracks the extension's source (path, git, or hex), its runtime status, the loaded module, and the config passed to init/1.

Summary

Types

Git-specific source options.

Hex-specific source options.

How the extension source code is obtained.

t()

Functions

Creates a git-sourced entry.

Creates a hex-sourced entry.

Creates a module-sourced entry for a bundled extension already on the code path.

Creates a path-sourced entry.

Types

git_opts()

@type git_opts() :: %{
  url: String.t(),
  branch: String.t() | nil,
  ref: String.t() | nil
}

Git-specific source options.

hex_opts()

@type hex_opts() :: %{package: String.t(), version: String.t() | nil, app: atom()}

Hex-specific source options.

source_type()

@type source_type() :: :path | :git | :hex | :module

How the extension source code is obtained.

t()

@type t() :: %Minga.Extension.Entry{
  config: keyword(),
  git: git_opts() | nil,
  hex: hex_opts() | nil,
  lifecycle_ref: reference() | nil,
  load_policy: Minga.Extension.load_policy() | nil,
  manifest: Minga.Extension.Manifest.t() | nil,
  module: module() | nil,
  path: String.t() | nil,
  pid: pid() | nil,
  source_type: source_type(),
  status: Minga.Extension.extension_status()
}

Functions

from_git(url, opts)

@spec from_git(
  String.t(),
  keyword()
) :: t()

Creates a git-sourced entry.

from_hex(package, app, opts)

@spec from_hex(String.t(), atom(), keyword()) :: t()

Creates a hex-sourced entry.

from_module(module, config)

@spec from_module(
  module(),
  keyword()
) :: t()

Creates a module-sourced entry for a bundled extension already on the code path.

from_path(path, config)

@spec from_path(
  String.t(),
  keyword()
) :: t()

Creates a path-sourced entry.