aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-proxy/src/lib.rs
diff options
context:
space:
mode:
authorYuchen Wu <[email protected]>2024-05-22 12:19:29 -0700
committerYuchen Wu <[email protected]>2024-05-31 11:04:36 -0700
commitfa071eb506411ff74c1986abebeeaa0d3e641db5 (patch)
tree36ec2d82fa48780a0fac44c39ed50efba9d52409 /pingora-proxy/src/lib.rs
parent4019aa0819ce70fb84ae9c1db7e702d7fe8701b3 (diff)
downloadpingora-fa071eb506411ff74c1986abebeeaa0d3e641db5.tar.gz
pingora-fa071eb506411ff74c1986abebeeaa0d3e641db5.zip
Refactor Service API: Arc is no longer needed for apps.
This change makes a bit cleaner to use the API. It also allows to modify the application logic before starting the service.
Diffstat (limited to 'pingora-proxy/src/lib.rs')
-rw-r--r--pingora-proxy/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/pingora-proxy/src/lib.rs b/pingora-proxy/src/lib.rs
index a60e6a7..eaf31d5 100644
--- a/pingora-proxy/src/lib.rs
+++ b/pingora-proxy/src/lib.rs
@@ -96,12 +96,12 @@ pub struct HttpProxy<SV> {
}
impl<SV> HttpProxy<SV> {
- fn new(inner: SV, conf: Arc<ServerConf>) -> Arc<Self> {
- Arc::new(HttpProxy {
+ fn new(inner: SV, conf: Arc<ServerConf>) -> Self {
+ HttpProxy {
inner,
client_upstream: Connector::new(Some(ConnectorOptions::from_server_conf(&conf))),
shutdown: Notify::new(),
- })
+ }
}
async fn handle_new_request(