Configuration Manager

File:
core/configmanager.lua

This is a Prosody Core Documentation module.
It handles parsing of configuration directives and provides methods to write configuration to different supported backends.

Methods

section_mt(section_name)

Returns a table of configuration section keys which it is able to find.
Its role is in parsing configuration.

getconfig()

Returns the config object currently in use.

get(host, section, key)

Returns the value of section[key] if found, else nil.
Reads the config.

set(host, section, key, value)

Writes a section[key] value.
Returns true if it succeeded or false if otherwise.

load(filename, format)

Loads and tries to parse a configuration file of a specific format.
format is either one of: ,

save(filename, format)

Saves the currently used configuration from memory to a file, using the format given.

addparser(format, parser)

Adds a parser for a new file format used for storing configuration.

Variables

 
doc/developers/core/configuration_manager.txt · Last modified: 2009/12/20 17:43 (external edit)