@@ -4,14 +4,19 @@ use tower::{
44 util:: { BoxCloneSyncService , BoxCloneSyncServiceLayer , MapErr } ,
55} ;
66
7- use super :: { Body , service:: ClientService } ;
7+ use super :: {
8+ Body ,
9+ connect:: { Conn , Unnameable } ,
10+ service:: ClientService ,
11+ } ;
812use crate :: {
913 client:: layer:: {
1014 redirect:: FollowRedirect ,
1115 retry:: Http2RetryPolicy ,
1216 timeout:: { ResponseBodyTimeout , Timeout , TimeoutBody } ,
1317 } ,
14- core:: body:: Incoming ,
18+ core:: { body:: Incoming , client:: connect} ,
19+ dns:: DynResolver ,
1520 error:: BoxError ,
1621 redirect:: FollowRedirectPolicy ,
1722} ;
@@ -54,13 +59,13 @@ pub type ResponseBody = TimeoutBody<tower_http::decompression::DecompressionBody
5459) ) ) ]
5560pub type ResponseBody = TimeoutBody < Incoming > ;
5661
57- pub type RedirectLayer = FollowRedirect <
62+ pub type FollowRedirectLayer = FollowRedirect <
5863 CookieLayer < ResponseBodyTimeout < Decompression < ClientService > > > ,
5964 FollowRedirectPolicy ,
6065> ;
6166
6267pub type GenericClientService =
63- MapErr < Timeout < Retry < Http2RetryPolicy , RedirectLayer > > , fn ( BoxError ) -> BoxError > ;
68+ MapErr < Timeout < Retry < Http2RetryPolicy , FollowRedirectLayer > > , fn ( BoxError ) -> BoxError > ;
6469
6570pub type BoxedClientService =
6671 BoxCloneSyncService < HttpRequest < Body > , HttpResponse < ResponseBody > , BoxError > ;
@@ -71,3 +76,10 @@ pub type BoxedClientLayer = BoxCloneSyncServiceLayer<
7176 HttpResponse < ResponseBody > ,
7277 BoxError ,
7378> ;
79+
80+ pub type HttpConnector = connect:: HttpConnector < DynResolver > ;
81+
82+ pub type BoxedConnectorService = BoxCloneSyncService < Unnameable , Conn , BoxError > ;
83+
84+ pub type BoxedConnectorLayer =
85+ BoxCloneSyncServiceLayer < BoxedConnectorService , Unnameable , Conn , BoxError > ;
0 commit comments