[router] Add Rust Binary Entrypoint for SGLang Router (#9089)

This commit is contained in:
Simo Lin
2025-08-11 21:37:36 -07:00
committed by GitHub
parent a218490136
commit 9d68bdb240
12 changed files with 638 additions and 78 deletions

View File

@@ -67,6 +67,7 @@ impl PDRouter {
self.timeout_secs,
self.interval_secs,
)
.await
.map_err(|_| PDRouterError::HealthCheckFailed {
url: url.to_string(),
})
@@ -349,7 +350,7 @@ impl PDRouter {
Ok(format!("Successfully removed decode server: {}", url))
}
pub fn new(
pub async fn new(
prefill_urls: Vec<(String, Option<u16>)>,
decode_urls: Vec<String>,
prefill_policy: Arc<dyn LoadBalancingPolicy>,
@@ -392,7 +393,8 @@ impl PDRouter {
&all_urls,
timeout_secs,
interval_secs,
)?;
)
.await?;
}
// Initialize cache-aware policies with workers