1#![allow(dead_code)]
3#![allow(unused_variables)]
4#![allow(unused_imports)]
5#![allow(clippy::too_many_arguments)]
6#![allow(clippy::match_like_matches_macro)]
7#![allow(clippy::manual_strip)]
8#![allow(clippy::only_used_in_recursion)]
9#![allow(clippy::type_complexity)]
10#![allow(clippy::manual_try_fold)]
11#![allow(private_interfaces)]
12
13pub mod acme;
46pub mod agents;
47pub mod app;
48pub mod builtin_handlers;
49pub mod cache;
50pub mod decompression;
51pub mod discovery;
52pub mod disk_cache;
53pub mod distributed_rate_limit;
54pub mod errors;
55pub mod hybrid_cache;
56pub mod memcached_rate_limit;
57
58pub mod geo_filter;
60pub mod grpc_health;
61pub mod health;
62pub mod http_helpers;
63pub mod inference;
64#[cfg(feature = "kubernetes")]
65pub mod kubeconfig;
66pub mod logging;
67pub mod memory_cache;
68pub mod metrics;
69pub mod metrics_server;
70pub mod otel;
71pub mod proxy;
72pub mod rate_limit;
73pub mod reload;
74pub mod routing;
75pub mod scoped_circuit_breaker;
76pub mod scoped_rate_limit;
77pub mod scoped_routing;
78pub mod shadow;
79pub mod static_files;
80pub mod tls;
81pub mod tls_metrics;
82pub mod trace_id;
83pub mod upstream;
84pub mod validation;
85pub mod websocket;
86
87pub mod bundle;
89
90pub use errors::ErrorHandler;
96
97pub use static_files::{CacheStats, CachedFile, FileCache, StaticFileServer};
99
100pub use validation::SchemaValidator;
102
103pub use routing::{RequestInfo, RouteMatch, RouteMatcher};
105pub use scoped_routing::{ScopedRouteMatch, ScopedRouteMatcher};
106
107pub use upstream::{
109 LoadBalancer, PoolConfigSnapshot, PoolStats, RequestContext, ShadowTarget, TargetSelection,
110 UpstreamPool, UpstreamTarget,
111};
112
113pub use health::{ActiveHealthChecker, PassiveHealthChecker, TargetHealthInfo};
115
116pub use agents::{AgentAction, AgentCallContext, AgentDecision, AgentManager};
118
119pub use reload::{ConfigManager, ReloadEvent, ReloadTrigger, SignalManager, SignalType};
121
122pub use app::AppState;
124
125pub use proxy::ZentinelProxy;
127
128pub use builtin_handlers::{
130 execute_handler, BuiltinHandlerState, CachePurgeRequest, TargetHealthStatus, TargetStatus,
131 UpstreamHealthSnapshot, UpstreamStatus,
132};
133
134pub use http_helpers::{
136 extract_request_info, get_or_create_trace_id, write_error, write_json_error, write_response,
137 write_text_error, OwnedRequestInfo,
138};
139
140pub use trace_id::{
142 generate_for_format, generate_tinyflake, generate_uuid, TraceIdFormat, TINYFLAKE_LENGTH,
143};
144
145pub use otel::{
147 create_traceparent, generate_span_id, generate_trace_id, get_tracer, init_tracer,
148 shutdown_tracer, OtelError, OtelTracer, RequestSpan, TraceContext, TRACEPARENT_HEADER,
149 TRACESTATE_HEADER,
150};
151
152pub use tls::{
154 build_server_config, build_upstream_tls_config, load_client_ca, validate_tls_config,
155 validate_upstream_tls_config, CertificateReloader, HotReloadableSniResolver, OcspCacheEntry,
156 OcspStapler, SniResolver, TlsError,
157};
158
159pub use logging::{
161 AccessLogEntry, AccessLogFormat, AuditEventType, AuditLogEntry, ErrorLogEntry, LogManager,
162 SharedLogManager,
163};
164
165pub use rate_limit::{
167 RateLimitConfig, RateLimitManager, RateLimitOutcome, RateLimitResult, RateLimiterPool,
168};
169
170pub use scoped_rate_limit::{ScopedRateLimitManager, ScopedRateLimitResult};
172
173pub use scoped_circuit_breaker::{ScopedBreakerStatus, ScopedCircuitBreakerManager};
175
176pub use shadow::{buffer_request_body, clone_body_for_shadow, should_buffer_method, ShadowManager};
178
179pub use geo_filter::{
181 GeoDatabaseWatcher, GeoFilterManager, GeoFilterPool, GeoFilterResult, GeoLookupError,
182};
183
184pub use decompression::{
186 decompress_body, decompress_body_with_stats, is_supported_encoding, parse_content_encoding,
187 DecompressionConfig, DecompressionError, DecompressionResult, DecompressionStats,
188};
189
190#[cfg(feature = "distributed-rate-limit")]
192pub use distributed_rate_limit::{
193 create_redis_rate_limiter, DistributedRateLimitStats, RedisRateLimiter,
194};
195
196#[cfg(feature = "distributed-rate-limit-memcached")]
198pub use memcached_rate_limit::{
199 create_memcached_rate_limiter, MemcachedRateLimitStats, MemcachedRateLimiter,
200};
201
202pub use cache::{
204 configure_cache, get_cache_eviction, get_cache_lock, get_cache_storage, init_disk_cache_state,
205 is_cache_enabled, save_disk_cache_state, CacheConfig, CacheManager, HttpCacheStats,
206};
207
208pub use memory_cache::{
210 MemoryCacheConfig, MemoryCacheManager, MemoryCacheStats, RouteMatchEntry, TypedCache,
211};
212
213pub use metrics::{MetricsManager, MetricsResponse};
215
216pub use discovery::{
218 ConsulDiscovery, DiscoveryConfig, DiscoveryManager, DnsDiscovery, KubernetesDiscovery,
219};
220
221#[cfg(feature = "kubernetes")]
223pub use kubeconfig::{KubeAuth, Kubeconfig, KubeconfigError, ResolvedKubeConfig};
224
225pub use zentinel_common::errors::{LimitType, ZentinelError, ZentinelResult};