EnvConf.Server

The EnvConf Server is the main config service. It provides a few functions for getting and setting Config Values.

The current behavior for setting values requires that both the key and value be binaries. However there are get functions that will return a value of a specific type.

Functions summary

get(key)

get takes a binary key value. It returns the binary stored in the system environment at that key.

get_atom(key)

getatom takes a binary key value. It returns the result of calling Kernel.binaryto_atom on the binary stored in the system environment at the given key.

get_boolean(key)

get_boolean takes a binary key value. If the value of that environment key is "false" or "FALSE" then it returns false. If the value of that environment key is "true" or "TRUE" then it returns true.

get_number(key)

getnumber takes a binary key value. It returns the result of calling Kernel.binaryto_integer on the binary stored in the system environment at that key.

set(dict)

Translate the given HashDict to the system environment. Keys map to environment variables and values map to values.

set(key, value)

Set the environment variable specified by key to the binary version of value.

start_link(defaults \\ [])

Functions

get(key)

get takes a binary key value. It returns the binary stored in the system environment at that key.

get_atom(key)

getatom takes a binary key value. It returns the result of calling Kernel.binaryto_atom on the binary stored in the system environment at the given key.

get_boolean(key)

get_boolean takes a binary key value. If the value of that environment key is "false" or "FALSE" then it returns false. If the value of that environment key is "true" or "TRUE" then it returns true.

get_number(key)

getnumber takes a binary key value. It returns the result of calling Kernel.binaryto_integer on the binary stored in the system environment at that key.

set(dict)

Translate the given HashDict to the system environment. Keys map to environment variables and values map to values.

set(key, value)

Set the environment variable specified by key to the binary version of value.

start_link(defaults \\ [])