Skip to main content

Crate cameleer_main

Crate cameleer_main 

Source
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 cameleer command 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-main cargo features).
integration
Camel K Integration resources run by cameleer-main (what the Camel K operator does on Kubernetes, done in-process).
lambda
AWS Lambda custom runtime (provided.al2023): cameleer serves Lambda invocations itself, with no runtime library or adapter in front of it.
local
Local process management used by the cameleer CLI (like Camel JBang’s ~/.camel directory): 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 the tool-* actions of crate::tools). The answer goes to <pid>-action-result.json: status (ok or error), message, and data for actions that return a document. The directory is $CAMEL_HOME or ~/.camel.
properties
Java .properties file 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 tables cameleer validate uses.
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, see crate::local) and the /q/dev/tools console (see crate::console).
validate
cameleer validate: check route files without running them.
yaml_rest
REST DSL support for the YAML (and XML) DSL: the rest and restConfiguration top-level elements, implemented with cameleer_http::rest::RestDslExt.

Structs§

Main
The main runner.
MainConfig
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 Main with all available components and route loaders registered.

Type Aliases§

RouteLoader
Loads routes from a file’s content into a context (registered per file extension).