Skip to content

Commit 2b5e897

Browse files
committed
Rename weightedRouter to wrrRouter
Signed-off-by: kerthcet <kerthcet@gmail.com>
1 parent 4769102 commit 2b5e897

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/client/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ mod tests {
8585
])
8686
.build()
8787
.unwrap(),
88-
expected_router_name: "WeightedRouter",
88+
expected_router_name: "WeightedRoundRobinRouter",
8989
},
9090
TestCase {
9191
name: "router tracker enabled",

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod router {
22
mod random;
33
pub mod router;
44
pub mod stats;
5-
mod weight;
5+
mod wrr;
66
}
77
mod client {
88
pub mod client;

src/router/router.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::sync::atomic::AtomicUsize;
44
use crate::config::{ModelConfig, ModelId, RoutingMode};
55
use crate::provider::provider::ResponseRequest;
66
use crate::router::random::RandomRouter;
7-
use crate::router::weight::WeightedRoundRobinRouter;
7+
use crate::router::wrr::WeightedRoundRobinRouter;
88

99
#[derive(Debug, Clone)]
1010
pub struct ModelInfo {
@@ -55,6 +55,6 @@ mod tests {
5555
assert_eq!(random_router.name(), "RandomRouter");
5656

5757
let weighted_router = construct_router(RoutingMode::WRR, model_configs.clone());
58-
assert_eq!(weighted_router.name(), "WeightedRouter");
58+
assert_eq!(weighted_router.name(), "WeightedRoundRobinRouter");
5959
}
6060
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ impl WeightedRoundRobinRouter {
2323

2424
impl Router for WeightedRoundRobinRouter {
2525
fn name(&self) -> &'static str {
26-
"WeightedRouter"
26+
"WeightedRoundRobinRouter"
2727
}
2828

2929
// Use Smooth Weighted Round Robin Algorithm.

0 commit comments

Comments
 (0)