Expand description
§cameleer-main
Standalone runner for Cameleer applications (Camel Main equivalent):
loads application.properties/application.yaml (with profiles, relaxed binding,
environment variables, camel.springboot.* aliases, camel.component.* options and
camel.beans.* beans, see config), configures the context, discovers route files
(YAML/XML DSL, Kamelets, Pipes and Camel K Integration resources, see
integration), starts the context and keeps running until stopped (signal, stop file,
max duration, max messages or idle timeout). With --dev (camel.main.dev-reload) route
files are reloaded when they change; local publishes the status files used by the
cameleer ps/get/cmd/log/trace/stop commands.
Modules§
- cli
- The
cameleercommand line (a Rust counterpart of Camel JBang). - config
- Application configuration: what Spring Boot / Quarkus auto-configuration provides for Camel, done by cameleer-main.
- console
- Management HTTP endpoints: health checks, Prometheus metrics and developer consoles
(like Camel Main’s embedded HTTP server with
camel.server.*options). - features
- Component families and other optional parts compiled into this binary (
cameleer-maincargo features). - integration
- Camel K
Integrationresources run by cameleer-main (what the Camel K operator does on Kubernetes, done in-process). - lambda
- AWS Lambda custom runtime (
provided.al2023):cameleerserves Lambda invocations itself, with no runtime library or adapter in front of it. - local
- Local process management used by the
cameleerCLI (like Camel JBang’s~/.cameldirectory): a running integration publishes<pid>.json(name, routes, context, health, backlog trace), logs to<pid>.log, and executes the commands written to<pid>-action.json(stop,reload,start-route,stop-route,suspend-route,resume-route,reset-stats,trace, and thetool-*actions ofcrate::tools). The answer goes to<pid>-action-result.json:status(okorerror),message, anddatafor actions that return a document. The directory is$CAMEL_HOMEor~/.camel. - properties
- Java
.propertiesfile parser (application.properties). - schema
cameleer schema: a JSON Schema (draft 2020-12) of the Camel YAML DSL, generated from the loader’s DSL model (cameleer_yaml::model), the same tablescameleer validateuses.- signal
- SIGINT/SIGTERM handling without external crates (POSIX
signal(2)via FFI). - testing
cameleer test: run routes from a YAML test file and check what they do, without a model (agent and model endpoints replay recorded responses,replay=file:...).- tools
- The kill switch and approvals of the AI action layer, for operators:
cameleer tool ...(through the local status files, seecrate::local) and the/q/dev/toolsconsole (seecrate::console). - validate
cameleer validate: check route files without running them.- yaml_
rest - REST DSL support for the YAML (and XML) DSL: the
restandrestConfigurationtop-level elements, implemented withcameleer_http::rest::RestDslExt.
Structs§
- Main
- The main runner.
- Main
Config - Configuration options (from
camel.main.*properties or code).
Functions§
- ant_
match - Ant-style path matching:
**matches any number of directories,*/?within a segment. - glob_
files - Expand a simple glob (
dir/*.yaml,dir/**/*.yaml, or a plain path) into files. - new_
main - Create a
Mainwith all available components and route loaders registered.
Type Aliases§
- Route
Loader - Loads routes from a file’s content into a context (registered per file extension).