Module riaknostic_config

Provides convenient access to Riak configuration values.

Description

Provides convenient access to Riak configuration values. When the riaknostic module calls prepare/0, Riak's app.config and vm.args files will be parsed and memoized, and lager will be started on the console at the configured severity level.

Function Index

base_dir/0The base directory from which the Riak script runs.
cookie/0The Riak node's distributed Erlang cookie.
data_directories/0Determines where Riak is configured to store data.
etc_dir/0The Riak configuration directory.
get_app_env/1Get a key out of the app.config file.
get_app_env/2Get a key out of the app.config file, or if it doesn't exist, return the Default.
get_vm_env/1Get an -env flag out of the vm.args file.
node_name/0The local Riak node name.
prepare/0Prepares appropriate configuration so the riaknostic script can run.
user/0Determines the user/uid that the installed Riak runs as.

Function Details

base_dir/0

base_dir() -> file:filename()

The base directory from which the Riak script runs.

cookie/0

cookie() -> atom()

The Riak node's distributed Erlang cookie.

data_directories/0

data_directories() -> [file:filename()]

Determines where Riak is configured to store data. Returns a list of paths to directories defined by storage backends.

etc_dir/0

etc_dir() -> file:filename()

The Riak configuration directory.

get_app_env/1

get_app_env(Keys::[atom()]) -> undefined | term()

Equivalent to get_app_env(Keys, undefined).

Get a key out of the app.config file. You specify a nested key using a list of atoms, e.g. [riak_kv, storage_backend].

get_app_env/2

get_app_env(Keys::[atom()], Default::term()) -> term()

Get a key out of the app.config file, or if it doesn't exist, return the Default. You specify a nested key using a list of atoms, e.g. [riak_kv, storage_backend].

See also: get_app_env/1.

get_vm_env/1

get_vm_env(Key::string()) -> string() | undefined

Get an -env flag out of the vm.args file.

node_name/0

node_name() -> {shortnames | longnames, Name::string()}

The local Riak node name. Includes whether the node uses short or long nodenames for distributed Erlang.

prepare/0

prepare() -> ok | {error, iodata()}

Prepares appropriate configuration so the riaknostic script can run. This is called by the riaknostic module and you do not need to invoke it.

user/0

user() -> string()

Determines the user/uid that the installed Riak runs as.


Generated by EDoc, Feb 18 2012, 03:37:56.