crabka_operator/lib.rs
1//! Crabka Kubernetes operator library.
2//!
3//! The binary entry point is `src/main.rs`; this library exposes the
4//! reusable pieces (controllers, CRD types, telemetry, leader election)
5//! so they can be unit-tested without spinning up the binary.
6//!
7//! ## Runtime config scope
8//!
9//! ```rust
10//! use crabka_operator::config::OperatorConfig;
11//!
12//! # fn example(mut config: OperatorConfig) {
13//! config.watch_namespaces = vec!["kafka-a".into(), "kafka-b".into()];
14//! assert_eq!(config.watched().unwrap().len(), 2);
15//!
16//! config.watch_namespaces.clear();
17//! assert!(config.watched().is_none());
18//! # }
19//! ```
20
21pub mod config;
22pub mod context;
23pub mod controller;
24pub mod crd;
25pub mod gen_crds;
26pub mod health;
27pub mod leader_election;
28pub mod rebalancer_client;
29pub mod run;
30pub mod telemetry;
31pub mod version;