mod.rs 756 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
13
14
pub mod worker;

// Re-export commonly used types at the module level
15
16
17
pub use circuit_breaker::{
    CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitState,
};
18
pub use error::{WorkerError, WorkerResult};
19
pub use retry::{BackoffCalculator, RetryError, RetryExecutor};
20
pub use worker::{
21
22
    start_health_checker, BasicWorker, DPAwareWorker, HealthChecker, Worker, WorkerCollection,
    WorkerFactory, WorkerLoadGuard, WorkerType,
23
};