@@ -52,17 +52,15 @@ impl Config {
5252 metrics : ProxyMetrics ,
5353 span_sink : Option < mpsc:: Sender < oc:: Span > > ,
5454 drain : drain:: Watch ,
55- ) -> impl tower :: Service <
55+ ) -> impl svc :: NewService <
5656 listen:: Addrs ,
57- Error = impl Into < Error > ,
58- Future = impl Send + ' static ,
59- Response = impl tower:: Service <
57+ Service = impl tower:: Service <
6058 tokio:: net:: TcpStream ,
6159 Response = ( ) ,
6260 Error = impl Into < Error > ,
6361 Future = impl Send + ' static ,
6462 > + Send
65- + ' static ,
63+ + ' static ,
6664 > + Send
6765 + ' static
6866 where
@@ -147,17 +145,15 @@ impl Config {
147145 tap_layer : tap:: Layer ,
148146 metrics : ProxyMetrics ,
149147 span_sink : Option < mpsc:: Sender < oc:: Span > > ,
150- ) -> impl tower :: Service <
148+ ) -> impl svc :: NewService <
151149 Target ,
152- Error = Error ,
153- Future = impl Send ,
154- Response = impl tower:: Service <
150+ Service = impl tower:: Service <
155151 http:: Request < http:: boxed:: Payload > ,
156152 Response = http:: Response < http:: boxed:: Payload > ,
157153 Error = Error ,
158154 Future = impl Send ,
159155 > + Unpin
160- + Send ,
156+ + Send ,
161157 > + Unpin
162158 + Clone
163159 + Send
@@ -282,7 +278,8 @@ impl Config {
282278 )
283279 . into_make_service ( )
284280 . spawn_buffer ( buffer_capacity)
285- . check_make_service :: < Target , http:: Request < http:: boxed:: Payload > > ( )
281+ . into_new_service ( )
282+ . check_new_service :: < Target , http:: Request < http:: boxed:: Payload > > ( )
286283 . into_inner ( )
287284 }
288285
@@ -293,30 +290,25 @@ impl Config {
293290 metrics : ProxyMetrics ,
294291 span_sink : Option < mpsc:: Sender < oc:: Span > > ,
295292 drain : drain:: Watch ,
296- ) -> impl tower :: Service <
293+ ) -> impl svc :: NewService <
297294 tls:: accept:: Meta ,
298- Error = impl Into < Error > ,
299- Future = impl Send + ' static ,
300- Response = impl tower:: Service <
295+ Service = impl tower:: Service <
301296 I ,
302297 Response = ( ) ,
303298 Error = impl Into < Error > ,
304299 Future = impl Send + ' static ,
305300 > + Send
306- + ' static ,
301+ + ' static ,
307302 > + Clone
308303 + Send
309304 + ' static
310305 where
311306 I : io:: AsyncRead + io:: AsyncWrite + Unpin + Send + ' static ,
312- F : tower:: Service < TcpEndpoint , Response = A > + Unpin + Clone + Send + ' static ,
313- F :: Error : Into < Error > ,
314- F :: Future : Send ,
307+ F : svc:: NewService < TcpEndpoint , Service = A > + Unpin + Clone + Send + ' static ,
315308 A : tower:: Service < io:: PrefixedIo < I > , Response = ( ) > + Clone + Send + ' static ,
316309 A :: Error : Into < Error > ,
317310 A :: Future : Send ,
318- H : tower:: Service < Target , Response = S , Error = Error > + Unpin + Clone + Send + ' static ,
319- H :: Future : Send ,
311+ H : svc:: NewService < Target , Service = S > + Unpin + Clone + Send + ' static ,
320312 S : tower:: Service <
321313 http:: Request < http:: boxed:: Payload > ,
322314 Response = http:: Response < http:: boxed:: Payload > ,
@@ -351,15 +343,13 @@ impl Config {
351343 ) ) ;
352344
353345 let http_server = svc:: stack ( http_router)
354- // Limits the amount of time each request waits to obtain a
355- // ready service.
356- . push_timeout ( dispatch_timeout)
357346 // Removes the override header after it has been used to
358347 // determine a reuquest target.
359348 . push_on_response ( strip_header:: request:: layer ( DST_OVERRIDE_HEADER ) )
360349 // Routes each request to a target, obtains a service for that
361350 // target, and dispatches the request.
362351 . instrument_from_target ( )
352+ . into_make_service ( )
363353 . push ( router:: Layer :: new ( RequestTarget :: from) )
364354 // Used by tap.
365355 . push_http_insert_target ( )
@@ -375,7 +365,6 @@ impl Config {
375365 )
376366 . instrument ( |_: & _ | debug_span ! ( "source" ) )
377367 . check_new_service :: < tls:: accept:: Meta , http:: Request < _ > > ( )
378- . into_make_service ( )
379368 . into_inner ( ) ;
380369
381370 DetectHttp :: new (
@@ -395,29 +384,23 @@ impl Config {
395384 tcp_forward : F ,
396385 identity : tls:: Conditional < identity:: Local > ,
397386 metrics : ProxyMetrics ,
398- ) -> impl tower :: Service <
387+ ) -> impl svc :: NewService <
399388 listen:: Addrs ,
400- Error = impl Into < Error > ,
401- Future = impl Send + ' static ,
402- Response = impl tower:: Service <
389+ Service = impl tower:: Service <
403390 TcpStream ,
404391 Response = ( ) ,
405392 Error = impl Into < Error > ,
406393 Future = impl Send + ' static ,
407394 > + Send
408- + ' static ,
395+ + ' static ,
409396 > + Send
410397 + ' static
411398 where
412- D : tower:: Service < tls:: accept:: Meta , Response = A > + Unpin + Clone + Send + Sync + ' static ,
413- D :: Error : Into < Error > ,
414- D :: Future : Unpin + Send ,
399+ D : svc:: NewService < tls:: accept:: Meta , Service = A > + Unpin + Clone + Send + Sync + ' static ,
415400 A : tower:: Service < SensorIo < io:: BoxedIo > , Response = ( ) > + Unpin + Send + ' static ,
416401 A :: Error : Into < Error > ,
417402 A :: Future : Send ,
418- F : tower:: Service < TcpEndpoint , Response = B > + Unpin + Clone + Send + Sync + ' static ,
419- F :: Error : Into < Error > ,
420- F :: Future : Unpin + Send ,
403+ F : svc:: NewService < TcpEndpoint , Service = B > + Unpin + Clone + Send + Sync + ' static ,
421404 B : tower:: Service < SensorIo < TcpStream > , Response = ( ) > + Unpin + Send + ' static ,
422405 B :: Error : Into < Error > ,
423406 B :: Future : Send ,
0 commit comments