ConfigZ v0.3.0 ConfigZ View Source
Runtime configuration for Elixir applications.
Link to this section Summary
Functions
Initialize the watcher
Read the config value
Watch the config, the callback function will be called whenever it is changed
Link to this section Types
Link to this type
callback() View Source
Link to this section Functions
Link to this function
init(args) View Source
Initialize the watcher.
Arguments
:name
: Unique name of the watcher.:adapter
: Only supports:config_map
.:callbacks
: The map of config keys and callbacks.For
:config_map
adapter::dir
: The path of the directory that mounted config map volume.
Link to this function
read(name, config_name) View Source
Read the config value.
Link to this function
watch(name, config_name, callback) View Source
Watch the config, the callback function will be called whenever it is changed.