@@ -3,8 +3,8 @@ use linkerd_app_core::{
33 exp_backoff:: { ExponentialBackoff , ExponentialBackoffStream } ,
44 metrics,
55 profiles:: { self , DiscoveryRejected } ,
6- proxy:: { api_resolve as api, identity:: LocalCrtKey , resolve:: recover} ,
7- svc:: NewService ,
6+ proxy:: { api_resolve as api, http , identity:: LocalCrtKey , resolve:: recover} ,
7+ svc:: { self , NewService } ,
88 Error , Recover ,
99} ;
1010
@@ -15,15 +15,15 @@ pub struct Config {
1515}
1616
1717/// Handles to destination service clients.
18- pub struct Dst {
18+ pub struct Dst < S > {
1919 /// The address of the destination service, used for logging.
2020 pub addr : control:: ControlAddr ,
2121
2222 /// Resolves profiles.
23- pub profiles : profiles:: Client < BackoffUnlessInvalidArgument , control :: Client > ,
23+ pub profiles : profiles:: Client < BackoffUnlessInvalidArgument , S > ,
2424
2525 /// Resolves endpoints.
26- pub resolve : recover:: Resolve < BackoffUnlessInvalidArgument , api:: Resolve < control :: Client > > ,
26+ pub resolve : recover:: Resolve < BackoffUnlessInvalidArgument , api:: Resolve < S > > ,
2727}
2828
2929#[ derive( Copy , Clone , Debug , Default ) ]
@@ -37,7 +37,17 @@ impl Config {
3737 dns : dns:: Resolver ,
3838 metrics : metrics:: ControlHttp ,
3939 identity : Option < LocalCrtKey > ,
40- ) -> Result < Dst , Error > {
40+ ) -> Result <
41+ Dst <
42+ impl svc:: Service <
43+ http:: Request < tonic:: body:: BoxBody > ,
44+ Response = http:: Response < control:: RspBody > ,
45+ Error = Error ,
46+ Future = impl Send ,
47+ > + Clone ,
48+ > ,
49+ Error ,
50+ > {
4151 let addr = self . control . addr . clone ( ) ;
4252 let backoff = BackoffUnlessInvalidArgument ( self . control . connect . backoff ) ;
4353 let svc = self . control . build ( dns, metrics, identity) . new_service ( ( ) ) ;
0 commit comments