LemonCore. ConfigReloader. Watcher
(lemon_core v0.1.0)
View Source
File-system watcher for config reload triggers.
Uses the file_system library (when available) to watch config files for
changes. Falls back to periodic polling when the native watcher is not
available or fails to start.
Watched paths:
~/.lemon/config.toml<cwd>/.lemon/config.toml
Both come from LemonCore.Paths, so pointing the config elsewhere moves the
watched paths with it.
.env(fromLEMON_DOTENV_DIRor cwd)
Native watcher targets are optimized:
- watch exact file paths when they already exist
- watch parent directories when files do not exist yet
File-system events are still filtered to the exact watched file set and debounced (250ms) to avoid redundant reloads from editor save sequences.
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts the Watcher GenServer.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Starts the Watcher GenServer.