Skip to main content

Crate cordis_cli

Crate cordis_cli 

Source
Expand description

Command-line runner for the cordis-rs plugin framework: cordis run <config.yml>.

The process model follows upstream Cordis’ NodeLoader: cordis run supervises a worker subprocess running the loader. The worker exits with code 51 to request a hot restart and 52 to quit; SIGINT / SIGTERM dispose the root context gracefully and exit 52. .env and .env.local are loaded (without overriding existing variables) before the worker boots, and the entry file is watched for hot reload.

Plugins reach the process controls through the worker service (worker::WorkerHandle): restart() maps to a full worker reload, and shutdown() stops the whole application.

Modules§

dotenv
Minimal .env loading — KEY=VALUE lines, no interpolation.
worker
Worker runtime: boot the loader, watch the config, exit on signals.

Structs§

Options
Parsed command line.

Enums§

Action
What the supervisor does after a worker exits.

Functions§

parse_args
Parse cordis arguments (after the binary name).
run
Entry point used by the cordis binary: parse arguments, load dotenv, then supervise or run as the worker.
supervisor_action
Decide whether to restart the worker after it exited with exit_code.