From 8727b2466f9a11aec6c5386c61c51ce54946b962 Mon Sep 17 00:00:00 2001 From: James Munns Date: Mon, 22 Apr 2024 17:01:37 +0200 Subject: [PATCH] Add `Service>` constructor for providing name --- pingora-proxy/src/lib.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pingora-proxy/src/lib.rs b/pingora-proxy/src/lib.rs index 930087d6..c7391ab5 100644 --- a/pingora-proxy/src/lib.rs +++ b/pingora-proxy/src/lib.rs @@ -626,3 +626,17 @@ pub fn http_proxy_service(conf: &Arc, inner: SV) -> Service( + conf: &Arc, + inner: SV, + name: &str, +) -> Service> { + Service::new( + name.to_string(), + HttpProxy::new(inner, conf.clone()), + ) +}