"vscode:/vscode.git/clone" did not exist on "124ed38d12bb82ba4e5b8adb746b62d76fb0129d"
mod.rs 1002 Bytes
Newer Older
1
2
3
4
5
//! Core abstractions for the SGLang router
//!
//! This module contains the fundamental types and traits used throughout the router:
//! - Worker trait and implementations
//! - Error types
6
//! - Circuit breaker for reliability
7
8
//! - Common utilities

9
pub mod circuit_breaker;
10
pub mod error;
11
pub mod retry;
12
pub mod token_bucket;
13
pub mod worker;
14
pub mod worker_builder;
15
pub mod worker_registry;
16
17

// Re-export commonly used types at the module level
18
19
20
pub use circuit_breaker::{
    CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitState,
};
21
pub use error::{WorkerError, WorkerResult};
22
pub use retry::{is_retryable_status, BackoffCalculator, RetryError, RetryExecutor};
23
pub use worker::{
24
    start_health_checker, BasicWorker, ConnectionMode, DPAwareWorker, HealthChecker, HealthConfig,
25
    Worker, WorkerFactory, WorkerLoadGuard, WorkerType,
26
};
27
pub use worker_builder::{BasicWorkerBuilder, DPAwareWorkerBuilder};
28
pub use worker_registry::{WorkerId, WorkerRegistry, WorkerRegistryStats};