highgaze/
lib.rs

1//! High-performance ADS-B data collector and storage library.
2//!
3//! This library provides functionality to:
4//! - Fetch ADS-B aircraft data from exchange APIs
5//! - Parse binary binCraft protocol
6//! - Store data in a custom high-performance format
7//! - Query historical aircraft data
8//!
9//! # Architecture
10//!
11//! ```text
12//! ┌─────────────┐    ┌─────────────┐    ┌─────────────┐
13//! │   Client    │───▶│  Protocol   │───▶│   Storage   │
14//! │  (HTTP/WS)  │    │  (Parser)   │    │  (Indexed)  │
15//! └─────────────┘    └─────────────┘    └─────────────┘
16//!        │                                     │
17//!        └─────────────┬───────────────────────┘
18//!                      ▼
19//!              ┌─────────────┐
20//!              │  Collector  │
21//!              │ (Orchestrator)│
22//!              └─────────────┘
23//! ```
24//!
25//! # Example
26//!
27//! ```no_run
28//! use adsb_collector::{
29//!     client::{AdsbClient, ClientConfig},
30//!     collector::{Collector, CollectorConfig},
31//!     storage::Storage,
32//! };
33//! use std::time::Duration;
34//!
35//! #[tokio::main]
36//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
37//!     // Configure client with authentication
38//!     let client_config = ClientConfig::new(
39//!         "session_id".to_string(),
40//!         "api_key".to_string(),
41//!     );
42//!
43//!     let client = AdsbClient::new(client_config)?;
44//!     let storage = Storage::open("adsb_data")?;
45//!
46//!     let collector = Collector::new(
47//!         client,
48//!         storage,
49//!         CollectorConfig::default(),
50//!     );
51//!
52//!     // Run the collector
53//!     collector.run().await?;
54//!
55//!     Ok(())
56//! }
57//! ```
58
59pub mod client;
60pub mod collector;
61pub mod compact;
62pub mod delta;
63pub mod delta_collector;
64pub mod delta_storage;
65pub mod protocol;
66pub mod storage;
67pub mod types;
68
69pub use client::{AdsbClient, ClientConfig, BoundingBox};
70pub use collector::{Collector, CollectorBuilder, CollectorConfig};
71pub use delta_collector::{DeltaCollector, DeltaCollectorConfig};
72pub use delta_storage::{DeltaStorage, DeltaStorageStats};
73pub use protocol::parse_response;
74pub use storage::Storage;
75pub use types::{AircraftRecord, IcaoAddress};