Skip to main content

Module tree_reload

Module tree_reload 

Source
Expand description

The timer that re-reads [tree]’s bounds from the configuration file.

The bounds a create is judged by are the ones an operator most needs to change while the server is busy: a cap that is refusing work is the worst moment to take the server down. So they are held in a didbot_pds::LiveTreeLimits the registry reads per create, and this is the clock that replaces what it holds.

A pass reads and parses the file whole and installs what it found only if every bound is in range. Anything else — the file gone, the TOML bad, a bound out of range — installs nothing and leaves the bounds that were already live in place. The built-in defaults are never reinstated by a failure: a configuration file that disappears must not widen or narrow what the operator last asked for.

Structs§

TreeReloader
A running reloader, stopped by TreeReloader::stop or by dropping it.

Enums§

TreeReloadError
Why a pass installed nothing. The live bounds keep their values.

Constants§

DEFAULT_TREE_RELOAD_INTERVAL
How often the bounds are re-read, absent [intervals] tree_reload_secs.

Functions§

reload_once
One pass: read path, and install its bounds into live if they are whole and in range.
tree_limits_of
The [tree] bounds config asks for, each falling back to TreeLimits’s own default where the key is absent.