1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Signal Horizon Hub integration for fleet-wide threat intelligence.
//!
//! This module provides WebSocket-based communication with the Signal Horizon
//! Hub for sharing threat signals and receiving blocklist updates across the
//! sensor fleet.
//!
//! # Architecture
//!
//! - [`config`] - Configuration for Horizon integration
//! - [`types`] - Protocol message types (sensor ↔ hub)
//! - [`blocklist`] - Local blocklist cache with O(1) lookup
//! - [`client`] - WebSocket client with auto-reconnect
//! - [`manager`] - High-level manager with batching
//!
//! # Example
//!
//! ```rust,no_run
//! use synapse_pingora::horizon::{HorizonManager, HorizonConfig, ThreatSignal, SignalType, Severity};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let config = HorizonConfig::default()
//! .with_hub_url("wss://horizon.example.com/ws")
//! .with_api_key("sk_live_xxx")
//! .with_sensor_id("sensor-001");
//!
//! let manager = HorizonManager::new(config).await?;
//! manager.start().await?;
//!
//! // Report a threat
//! manager.report_signal(ThreatSignal::new(SignalType::IpThreat, Severity::High)
//! .with_source_ip("192.168.1.100")
//! .with_confidence(0.95));
//!
//! // Check blocklist (O(1) lookup)
//! if manager.is_ip_blocked("10.0.0.1") {
//! println!("IP is blocked!");
//! }
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
pub use HorizonConfig;
pub use HorizonError;
pub use ;
pub use ;
pub use ;