UP | HOME

leptus_config

Module

leptus_config

This module is a gen_server which has an ETS table. It's used for keeping configurations in memory.

Types

Key     = any()
Value   = any()
App     = atom()

Functions

start/0

Starts leptus_config gen_server.

start() -> {ok, pid()} | {error, any()}

lookup/1

Finds a key-value.

lookup(Key) -> any() | undefined

lookup/2

Finds a key-value. This returns the Default if nothing found.

lookup(Key, Default) -> any() | Default

set/2

Associates a key to a value.

set(Key, Value) -> ok

config_file/1

Reads leptus configuration file that is App/priv/leptus.config.

config_file(App) -> [any()] | {error, enoent}

Author: Sina Samavati

Created: 2018-09-19