diff options
Diffstat (limited to 'exes/rest/src/ratelimit_client/remote_hashring.rs')
| -rw-r--r-- | exes/rest/src/ratelimit_client/remote_hashring.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/exes/rest/src/ratelimit_client/remote_hashring.rs b/exes/rest/src/ratelimit_client/remote_hashring.rs index d1c1702..b8771e5 100644 --- a/exes/rest/src/ratelimit_client/remote_hashring.rs +++ b/exes/rest/src/ratelimit_client/remote_hashring.rs @@ -1,7 +1,7 @@ use core::fmt::Debug; -use std::convert::TryFrom; use opentelemetry::propagation::Injector; use proto::nova::ratelimit::ratelimiter::ratelimiter_client::RatelimiterClient; +use std::convert::TryFrom; use std::hash::Hash; use std::ops::Deref; use std::ops::DerefMut; @@ -47,10 +47,10 @@ impl<'a> Injector for MetadataMap<'a> { } } - impl VNode { - pub async fn new(address: String) -> Result<Self, tonic::transport::Error> { - let client = RatelimiterClient::connect(format!("http://{}:8093", address.clone())).await?; + pub async fn new(address: String, port: u16) -> Result<Self, tonic::transport::Error> { + let client = + RatelimiterClient::connect(format!("http://{}:{}", address.clone(), port)).await?; Ok(VNode { client, address }) } |
