Files
telecom-platform/apps/charging-engine/src/lib.rs
T
nutcas3 ccb2ab7ee8 refactor: Add comprehensive documentation with examples to charging-engine modules
- Add module-level documentation to lib.rs with usage example
- Document Claims and AuthConfig structs with examples in auth.rs
- Add ChargingEngine struct documentation with initialization example
- Document ChargingRule, SubscriberAccount, AccountStatus, UsageEvent, UsageType, and RatingPlan with examples in types.rs
- Add CircuitState, CircuitBreakerError, and CircuitBreaker documentation with examples in circuit_breaker.rs
2026-04-29 04:36:40 +03:00

44 lines
1.0 KiB
Rust

//! # Charging Engine
//!
//! A high-performance telecom charging engine for real-time usage-based billing.
//!
//! ## Features
//!
//! - Real-time rating and billing
//! - Circuit breaker for fault tolerance
//! - Rate limiting for API protection
//! - Comprehensive monitoring and metrics
//!
//! ## Example
//!
//! ```rust,no_run
//! use charging_engine::ChargingEngine;
//! use charging_engine::charging::types::UsageEvent;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let engine = ChargingEngine::new("redis://localhost").await?;
//!
//! let event = UsageEvent {
//! imsi: "1234567890".to_string(),
//! volume: 1000,
//! timestamp: chrono::Utc::now(),
//! };
//!
//! let cost = engine.calculate_cost(&event).await?;
//! println!("Cost: {}", cost);
//!
//! Ok(())
//! }
//! ```
pub mod auth;
pub mod charging;
pub mod circuit_breaker;
pub mod errors;
// pub mod rate_limit;
pub mod handlers;
pub mod routes;
pub mod models;
pub mod monitoring;