Skip to content

Commit

Permalink
fix(proxy): Add power_of_two and least_loaded to FromStr trait
Browse files Browse the repository at this point in the history
Also adjusted `roundrobin`to `round_robin` as described in `bin/config.toml`

```toml
load_balancing = "round_robin"
```
  • Loading branch information
pims committed Dec 18, 2022
1 parent f39638b commit 7555d38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion command/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,10 @@ impl FromStr for LoadBalancingAlgorithms {

fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"roundrobin" => Ok(LoadBalancingAlgorithms::RoundRobin),
"round_robin" => Ok(LoadBalancingAlgorithms::RoundRobin),
"random" => Ok(LoadBalancingAlgorithms::Random),
"power_of_two" => Ok(LoadBalancingAlgorithms::PowerOfTwo),
"least_loaded" => Ok(LoadBalancingAlgorithms::LeastLoaded),
_ => Err(ParseErrorLoadBalancing {}),
}
}
Expand Down

0 comments on commit 7555d38

Please sign in to comment.