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 agentic;
60pub mod geo_filter;
61pub mod grpc_health;
62pub mod health;
63pub mod http_helpers;
64pub mod inference;
65#[cfg(feature = "kubernetes")]
66pub mod kubeconfig;
67pub mod logging;
68pub mod memory_cache;
69pub mod metrics;
70pub mod metrics_server;
71pub mod otel;
72pub mod proxy;
73pub mod rate_limit;
74pub mod reload;
75pub mod routing;
76pub mod scoped_circuit_breaker;
77pub mod scoped_rate_limit;
78pub mod scoped_routing;
79pub mod shadow;
80pub mod static_files;
81pub mod tls;
82pub mod tls_metrics;
83pub mod trace_id;
84pub mod upstream;
85pub mod validation;
86pub mod websocket;
87
88pub mod bundle;
90
91pub use errors::ErrorHandler;
97
98pub use static_files::{CacheStats, CachedFile, FileCache, StaticFileServer};
100
101pub use validation::SchemaValidator;
103
104pub use routing::{RequestInfo, RouteMatch, RouteMatcher};
106pub use scoped_routing::{ScopedRouteMatch, ScopedRouteMatcher};
107
108pub use upstream::{
110 LoadBalancer, PoolConfigSnapshot, PoolStats, RequestContext, ShadowTarget, TargetSelection,
111 UpstreamPool, UpstreamTarget,
112};
113
114pub use health::{ActiveHealthChecker, PassiveHealthChecker, TargetHealthInfo};
116
117pub use agents::{AgentAction, AgentCallContext, AgentDecision, AgentManager};
119
120pub use reload::{ConfigManager, ReloadEvent, ReloadTrigger, SignalManager, SignalType};
122
123pub use app::AppState;
125
126pub use proxy::ZentinelProxy;
128
129pub use builtin_handlers::{
131 execute_handler, BuiltinHandlerState, CachePurgeRequest, TargetHealthStatus, TargetStatus,
132 UpstreamHealthSnapshot, UpstreamStatus,
133};
134
135pub use http_helpers::{
137 extract_request_info, get_or_create_trace_id, write_error, write_json_error, write_response,
138 write_text_error, OwnedRequestInfo,
139};
140
141pub use trace_id::{
143 generate_for_format, generate_tinyflake, generate_uuid, TraceIdFormat, TINYFLAKE_LENGTH,
144};
145
146pub use otel::{
148 create_traceparent, generate_span_id, generate_trace_id, get_tracer, init_tracer,
149 shutdown_tracer, OtelError, OtelTracer, RequestSpan, TraceContext, TRACEPARENT_HEADER,
150 TRACESTATE_HEADER,
151};
152
153pub use tls::{
155 build_server_config, build_upstream_tls_config, load_client_ca, validate_tls_config,
156 validate_upstream_tls_config, CertificateReloader, HotReloadableSniResolver, OcspCacheEntry,
157 OcspStapler, SniResolver, TlsError,
158};
159
160pub use logging::{
162 AccessLogEntry, AccessLogFormat, AuditEventType, AuditLogEntry, ErrorLogEntry, LogManager,
163 SharedLogManager,
164};
165
166pub use rate_limit::{
168 RateLimitConfig, RateLimitManager, RateLimitOutcome, RateLimitResult, RateLimiterPool,
169};
170
171pub use scoped_rate_limit::{ScopedRateLimitManager, ScopedRateLimitResult};
173
174pub use scoped_circuit_breaker::{ScopedBreakerStatus, ScopedCircuitBreakerManager};
176
177pub use shadow::{buffer_request_body, clone_body_for_shadow, should_buffer_method, ShadowManager};
179
180pub use geo_filter::{
182 GeoDatabaseWatcher, GeoFilterManager, GeoFilterPool, GeoFilterResult, GeoLookupError,
183};
184
185pub use decompression::{
187 decompress_body, decompress_body_with_stats, is_supported_encoding, parse_content_encoding,
188 DecompressionConfig, DecompressionError, DecompressionResult, DecompressionStats,
189};
190
191#[cfg(feature = "distributed-rate-limit")]
193pub use distributed_rate_limit::{
194 create_redis_rate_limiter, DistributedRateLimitStats, RedisRateLimiter,
195};
196
197#[cfg(feature = "distributed-rate-limit-memcached")]
199pub use memcached_rate_limit::{
200 create_memcached_rate_limiter, MemcachedRateLimitStats, MemcachedRateLimiter,
201};
202
203pub use cache::{
205 configure_cache, get_cache_eviction, get_cache_lock, get_cache_storage, init_disk_cache_state,
206 is_cache_enabled, save_disk_cache_state, CacheConfig, CacheManager, HttpCacheStats,
207};
208
209pub use memory_cache::{
211 MemoryCacheConfig, MemoryCacheManager, MemoryCacheStats, RouteMatchEntry, TypedCache,
212};
213
214pub use metrics::{MetricsManager, MetricsResponse};
216
217pub use discovery::{
219 ConsulDiscovery, DiscoveryConfig, DiscoveryManager, DnsDiscovery, KubernetesDiscovery,
220 SrvDiscovery,
221};
222
223#[cfg(feature = "kubernetes")]
225pub use kubeconfig::{KubeAuth, Kubeconfig, KubeconfigError, ResolvedKubeConfig};
226
227pub use zentinel_common::errors::{LimitType, ZentinelError, ZentinelResult};