ConfigManager

class ConfigManager(logger: Logger)(source)

Reads config.yml into LunaticChatConfiguration.

The file is deserialized directly rather than copied key by key, so a default lives only on the data class. The hand-written mapper it replaced repeated every default in a second place, and they had already drifted - checkForUpdates disagreed with both config.yml and the data class, and the whole messageLogging block was documented but never read.

Two readings are offered because startup and reload want opposite things from a bad file: loadConfiguration keeps the server coming up, loadStrictly keeps a running server on the configuration it already has.

Constructors

Link copied to clipboard
constructor(logger: Logger)

Functions

Link copied to clipboard

Parses contents as config.yml.

Link copied to clipboard

Parses contents as config.yml, refusing anything it cannot read in full.