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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
//! # Net
//!
//! High-performance, schema-agnostic, backend-agnostic event bus designed for
//! AI runtime workloads.
//!
//! ## Primary Use Case
//!
//! Net is fundamentally designed to **ingest, relay, and replay
//! AI-generated streaming output** at GPU-native speeds. Target workloads include:
//!
//! - **Token streams**: LLM output tokens as they're generated
//! - **Multi-agent event flows**: Inter-agent communication in agentic systems
//! - **Tool-use streams**: Function calls, API invocations, tool results
//! - **Guardrail streams**: Safety checks, content filtering, policy enforcement
//! - **Consensus streams**: Multi-model voting, ensemble decisions
//! - **Structured-output parsing events**: JSON mode, schema validation
//! - **Retry/fallback trees**: Failure handling, alternative paths
//! - **Drift detection events**: Model behavior monitoring
//! - **Session lifecycle streams**: Conversation state, context management
//!
//! ## Performance Targets
//!
//! - **≥ 10 million events/sec sustained ingestion**
//! - **≥ 100 million events/sec microburst tolerance**
//! - **< 1μs p99 ingestion latency**
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use net::{EventBus, EventBusConfig, Event};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create event bus with default configuration
//! let bus = EventBus::new(EventBusConfig::default()).await?;
//!
//! // Ingest events (non-blocking)
//! let event = Event::from_str(r#"{"token": "hello", "index": 0}"#)?;
//! bus.ingest(event)?;
//!
//! // Poll events
//! let response = bus.poll(Default::default()).await?;
//! for event in response.events {
//! println!("{:?}", event.raw);
//! }
//!
//! bus.shutdown().await?;
//! Ok(())
//! }
//! ```
pub use TimestampGenerator;
// Re-exports for convenience
pub use ;
pub use JetStreamAdapterConfig;
pub use RedisAdapterConfig;
pub use ScalingPolicy;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;