diff --git a/proxy/src/console_redirect_proxy.rs b/proxy/src/console_redirect_proxy.rs index 9e17976720..ffa95241b9 100644 --- a/proxy/src/console_redirect_proxy.rs +++ b/proxy/src/console_redirect_proxy.rs @@ -4,7 +4,7 @@ use crate::proxy::{ prepare_client_connection, run_until_cancelled, ClientRequestError, ErrorSource, }; use crate::{ - cancellation::{CancellationHandlerMain, CancellationHandlerMainInternal}, + cancellation::CancellationHandlerMain, context::RequestMonitoring, error::ReportableError, metrics::{Metrics, NumClientConnectionsGuard}, @@ -143,7 +143,7 @@ pub(crate) async fn handle_client( cancellation_handler: Arc, stream: S, conn_gauge: NumClientConnectionsGuard<'static>, -) -> Result>, ClientRequestError> { +) -> Result>, ClientRequestError> { info!( protocol = %ctx.protocol(), "handling interactive connection from client" diff --git a/proxy/src/proxy/mod.rs b/proxy/src/proxy/mod.rs index 6ec7b6f22d..69d32f11b2 100644 --- a/proxy/src/proxy/mod.rs +++ b/proxy/src/proxy/mod.rs @@ -14,7 +14,7 @@ use crate::config::ProxyProtocolV2; use crate::control_plane::provider::ControlPlaneBackend; use crate::{ auth, - cancellation::{self, CancellationHandlerMain, CancellationHandlerMainInternal}, + cancellation::{self, CancellationHandlerMain}, compute, config::{ProxyConfig, TlsConfig}, context::RequestMonitoring, @@ -256,7 +256,7 @@ pub(crate) async fn handle_client( mode: ClientMode, endpoint_rate_limiter: Arc, conn_gauge: NumClientConnectionsGuard<'static>, -) -> Result>, ClientRequestError> { +) -> Result>, ClientRequestError> { info!( protocol = %ctx.protocol(), "handling interactive connection from client" diff --git a/proxy/src/proxy/passthrough.rs b/proxy/src/proxy/passthrough.rs index bbea47f8af..915bce7a53 100644 --- a/proxy/src/proxy/passthrough.rs +++ b/proxy/src/proxy/passthrough.rs @@ -1,5 +1,5 @@ use crate::{ - cancellation, + cancellation::{self, CancellationHandlerMainInternal}, compute::PostgresConnection, control_plane::messages::MetricsAuxInfo, metrics::{Direction, Metrics, NumClientConnectionsGuard, NumConnectionRequestsGuard}, @@ -57,17 +57,17 @@ pub(crate) async fn proxy_pass( Ok(()) } -pub(crate) struct ProxyPassthrough { +pub(crate) struct ProxyPassthrough { pub(crate) client: Stream, pub(crate) compute: PostgresConnection, pub(crate) aux: MetricsAuxInfo, pub(crate) _req: NumConnectionRequestsGuard<'static>, pub(crate) _conn: NumClientConnectionsGuard<'static>, - pub(crate) _cancel: cancellation::Session

, + pub(crate) _cancel: cancellation::Session, } -impl ProxyPassthrough { +impl ProxyPassthrough { pub(crate) async fn proxy_pass(self) -> Result<(), ErrorSource> { let res = proxy_pass(self.client, self.compute.stream, self.aux).await; if let Err(err) = self.compute.cancel_closure.try_cancel_query().await {