1#![allow(dead_code)]
53#![allow(clippy::type_complexity)]
54#![allow(clippy::too_many_arguments)]
55
56pub mod auth;
57pub mod balancer;
58pub mod circuit_breaker;
59pub mod circuit_cache;
60pub mod client;
61pub mod config;
62pub mod convert;
63pub mod error;
64pub mod grpc_service;
65pub mod logging_layer;
66pub mod metrics_layer;
67#[cfg(feature = "telemetry")]
68pub mod otel_propagator;
69pub mod pool;
70pub mod rate_limiter;
71pub mod server;
72pub mod server_admin;
73pub mod server_builder;
74pub mod server_types;
75pub mod tracing_middleware;
76
77#[cfg(feature = "mtls")]
79pub mod mtls;
80#[cfg(feature = "mtls")]
81pub mod ocsp;
82#[cfg(feature = "mtls")]
83pub mod tls;
84#[cfg(feature = "mtls")]
85pub mod tls_acceptor;
86#[cfg(feature = "mtls")]
87pub mod tls_crypto;
88
89pub mod proto {
91 pub mod types {
92 #![allow(clippy::all)]
93 #![allow(warnings)]
94 include!(concat!(env!("OUT_DIR"), "/amaters.types.rs"));
95 }
96 pub mod query {
97 #![allow(clippy::all)]
98 #![allow(warnings)]
99 include!(concat!(env!("OUT_DIR"), "/amaters.query.rs"));
100 }
101 pub mod errors {
102 #![allow(clippy::all)]
103 #![allow(warnings)]
104 include!(concat!(env!("OUT_DIR"), "/amaters.errors.rs"));
105 }
106 pub mod aql {
107 #![allow(clippy::all)]
108 #![allow(warnings)]
109 include!(concat!(env!("OUT_DIR"), "/amaters.aql.rs"));
110 }
111}
112
113pub use circuit_cache::{CircuitCache, CircuitCacheConfig, CircuitCacheKey, CircuitCacheStats};
115pub use config::{
116 AuthSection, LogVerbosityWire, LoggingSection, MetricsSection, NetConfig, NetSection,
117 RateLimitSection, TlsSection,
118};
119pub use error::{NetError, NetResult};
120pub use logging_layer::{LogVerbosity, LoggingLayer, LoggingService};
121pub use metrics_layer::{NetMetrics, spawn_metrics_server};
122pub use server::{AqlServerBuilder, AqlServiceImpl};
123pub use server_types::StreamConfig;
124
125#[cfg(feature = "mtls")]
127pub use tls_acceptor::{LiveTlsAcceptor, TlsCredsRef, build_rustls_config};
128
129#[cfg(feature = "telemetry")]
131pub use otel_propagator::{TraceparentExtractor, inject_trace_context};
132
133#[cfg(feature = "mtls")]
135pub use mtls::{
136 CrlRevocationChecker, HandshakeResult, MtlsClient, MtlsClientVerifier, MtlsConfigBuilder,
137 MtlsServer, MtlsServerVerifier, OcspRevocationChecker, Principal, PrincipalMapper,
138 RevocationChecker, RevocationStatus,
139};
140#[cfg(feature = "mtls")]
141pub use tls::{
142 CertificateFormat, CertificateInfo, CertificateLoader, CertificateStore,
143 HotReloadableCertificates, PrivateKeyLoader, PrivateKeyType, SelfSignedGenerator,
144};
145
146#[cfg(feature = "quic")]
148pub mod quic_transport;
149#[cfg(feature = "quic")]
150pub use quic_transport::{QuicClient, QuicClientConfig, QuicServer, QuicServerConfig};
151
152pub const VERSION: &str = env!("CARGO_PKG_VERSION");
154
155pub const PROTOCOL_VERSION: (u32, u32, u32) = (0, 2, 0);
157
158#[cfg(test)]
159mod tests {
160 use super::*;
161
162 #[test]
163 fn test_version() {
164 assert!(VERSION.contains('.'), "VERSION should be semver format");
167 }
168
169 #[test]
170 fn test_protocol_version() {
171 assert_eq!(PROTOCOL_VERSION, (0, 2, 0));
172 }
173}