Skip to main content

Module worker

Module worker 

Source
Expand description

Worker runtime: boot the loader, watch the config, exit on signals.

Structs§

WorkerHandle
Handle exposed as the worker service so plugins can stop or restart the process (upstream’s ctx.loader.exit / full-reload protocol).

Constants§

EXIT_BOOT
Exit code reporting that the loader never came up (bad config, unreadable file); the daemon exits non-zero instead of masking it.
EXIT_QUIT
Exit code telling the daemon to quit without restarting.
EXIT_RESTART
Exit code asking the daemon for a hot restart.

Functions§

run
Run the worker process: load dotenv, boot the loader (with dynamic plugin directories, if any), watch the entry file and the plugin directories, and block until a signal (or a worker service call) exits the process. Never returns.