feat: Add charging engine integration with periodic usage reporting to packet gateway

- Add reqwest dependency with json feature to Cargo.toml
- Add charging_client module import and ChargingEngineClient initialization
- Add --charging-engine-url CLI argument with default http://localhost:3001
- Add periodic usage reporting every 60 seconds with batch processing
- Add IP-to-session-id mapping for usage events (format: session-{ip})
- Add async batch usage reporting with error logging on failure
- Add last
This commit is contained in:
nutcas3
2026-04-25 05:29:00 +03:00
parent e839ffb519
commit 91b8d53662
2 changed files with 46 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ axum = "0.8.9"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = "0.4"
reqwest = { version = "0.12", features = ["json"] }
[[bin]]
name = "packet-gateway"