Lamina.Server.Provider (lamina v0.2.2)

Helps the Lamina server deal with individual providers.

Link to this section Summary

Link to this section Types

Link to this type

config_key()

Specs

config_key() :: atom()

Specs

lifetime() :: Lamina.Provider.lifetime()

Specs

provider() :: module()

Specs

state() :: any()

Link to this section Functions

Link to this function

config_change(module, callback_fun, state)

Specs

config_change(provider(), (config_key() -> :ok | {:error, any()}), state()) ::
  {:ok, state()} | {:error, any()}
Link to this function

fetch_config(module, config_key, state)

Specs

fetch_config(provider(), config_key(), state()) ::
  {:ok, state()} | {:ok, any(), lifetime(), state()} | {:error, any()}
Link to this function

is_provider_module(module)

Specs

is_provider_module(provider()) ::
  {:ok, provider()} | {:error, Lamina.Error.NotAProviderModuleError.t()}
Link to this function

start(module, opts)

Specs

start(provider(), keyword()) ::
  {:ok, state()} | {:ok, state(), pos_integer()} | {:error, any()}