@@ -87,8 +87,8 @@ pub struct NumaNode {
8787/// Generated client implementations.
8888pub mod pod_resources_lister_client {
8989 #![ allow( unused_variables, dead_code, missing_docs, clippy:: let_unit_value) ]
90- use tonic:: codegen:: * ;
9190 use tonic:: codegen:: http:: Uri ;
91+ use tonic:: codegen:: * ;
9292 /// PodResourcesLister is a service provided by the kubelet that provides information about the
9393 /// node resources consumed by pods and containers on the node
9494 #[ derive( Debug , Clone ) ]
@@ -129,14 +129,13 @@ pub mod pod_resources_lister_client {
129129 F : tonic:: service:: Interceptor ,
130130 T :: ResponseBody : Default ,
131131 T : tonic:: codegen:: Service <
132- http:: Request < tonic:: body:: BoxBody > ,
133- Response = http:: Response <
134- <T as tonic:: client:: GrpcService < tonic:: body:: BoxBody > >:: ResponseBody ,
132+ http:: Request < tonic:: body:: BoxBody > ,
133+ Response = http:: Response <
134+ <T as tonic:: client:: GrpcService < tonic:: body:: BoxBody > >:: ResponseBody ,
135+ > ,
135136 > ,
136- > ,
137- <T as tonic:: codegen:: Service <
138- http:: Request < tonic:: body:: BoxBody > ,
139- > >:: Error : Into < StdError > + Send + Sync ,
137+ <T as tonic:: codegen:: Service < http:: Request < tonic:: body:: BoxBody > > >:: Error :
138+ Into < StdError > + Send + Sync ,
140139 {
141140 PodResourcesListerClient :: new ( InterceptedService :: new ( inner, interceptor) )
142141 }
@@ -174,23 +173,16 @@ pub mod pod_resources_lister_client {
174173 pub async fn list (
175174 & mut self ,
176175 request : impl tonic:: IntoRequest < super :: ListPodResourcesRequest > ,
177- ) -> std:: result:: Result <
178- tonic:: Response < super :: ListPodResourcesResponse > ,
179- tonic:: Status ,
180- > {
181- self . inner
182- . ready ( )
183- . await
184- . map_err ( |e| {
185- tonic:: Status :: new (
186- tonic:: Code :: Unknown ,
187- format ! ( "Service was not ready: {}" , e. into( ) ) ,
188- )
189- } ) ?;
176+ ) -> std:: result:: Result < tonic:: Response < super :: ListPodResourcesResponse > , tonic:: Status >
177+ {
178+ self . inner . ready ( ) . await . map_err ( |e| {
179+ tonic:: Status :: new (
180+ tonic:: Code :: Unknown ,
181+ format ! ( "Service was not ready: {}" , e. into( ) ) ,
182+ )
183+ } ) ?;
190184 let codec = tonic:: codec:: ProstCodec :: default ( ) ;
191- let path = http:: uri:: PathAndQuery :: from_static (
192- "/v1.PodResourcesLister/List" ,
193- ) ;
185+ let path = http:: uri:: PathAndQuery :: from_static ( "/v1.PodResourcesLister/List" ) ;
194186 let mut req = request. into_request ( ) ;
195187 req. extensions_mut ( )
196188 . insert ( GrpcMethod :: new ( "v1.PodResourcesLister" , "List" ) ) ;
@@ -199,28 +191,23 @@ pub mod pod_resources_lister_client {
199191 pub async fn get_allocatable_resources (
200192 & mut self ,
201193 request : impl tonic:: IntoRequest < super :: AllocatableResourcesRequest > ,
202- ) -> std:: result:: Result <
203- tonic:: Response < super :: AllocatableResourcesResponse > ,
204- tonic:: Status ,
205- > {
206- self . inner
207- . ready ( )
208- . await
209- . map_err ( |e| {
210- tonic:: Status :: new (
211- tonic:: Code :: Unknown ,
212- format ! ( "Service was not ready: {}" , e. into( ) ) ,
213- )
214- } ) ?;
194+ ) -> std:: result:: Result < tonic:: Response < super :: AllocatableResourcesResponse > , tonic:: Status >
195+ {
196+ self . inner . ready ( ) . await . map_err ( |e| {
197+ tonic:: Status :: new (
198+ tonic:: Code :: Unknown ,
199+ format ! ( "Service was not ready: {}" , e. into( ) ) ,
200+ )
201+ } ) ?;
215202 let codec = tonic:: codec:: ProstCodec :: default ( ) ;
216203 let path = http:: uri:: PathAndQuery :: from_static (
217204 "/v1.PodResourcesLister/GetAllocatableResources" ,
218205 ) ;
219206 let mut req = request. into_request ( ) ;
220- req. extensions_mut ( )
221- . insert (
222- GrpcMethod :: new ( "v1.PodResourcesLister" , " GetAllocatableResources") ,
223- ) ;
207+ req. extensions_mut ( ) . insert ( GrpcMethod :: new (
208+ "v1.PodResourcesLister" ,
209+ " GetAllocatableResources",
210+ ) ) ;
224211 self . inner . unary ( req, path, codec) . await
225212 }
226213 }
@@ -235,17 +222,11 @@ pub mod pod_resources_lister_server {
235222 async fn list (
236223 & self ,
237224 request : tonic:: Request < super :: ListPodResourcesRequest > ,
238- ) -> std:: result:: Result <
239- tonic:: Response < super :: ListPodResourcesResponse > ,
240- tonic:: Status ,
241- > ;
225+ ) -> std:: result:: Result < tonic:: Response < super :: ListPodResourcesResponse > , tonic:: Status > ;
242226 async fn get_allocatable_resources (
243227 & self ,
244228 request : tonic:: Request < super :: AllocatableResourcesRequest > ,
245- ) -> std:: result:: Result <
246- tonic:: Response < super :: AllocatableResourcesResponse > ,
247- tonic:: Status ,
248- > ;
229+ ) -> std:: result:: Result < tonic:: Response < super :: AllocatableResourcesResponse > , tonic:: Status > ;
249230 }
250231 /// PodResourcesLister is a service provided by the kubelet that provides information about the
251232 /// node resources consumed by pods and containers on the node
@@ -272,10 +253,7 @@ pub mod pod_resources_lister_server {
272253 max_encoding_message_size : None ,
273254 }
274255 }
275- pub fn with_interceptor < F > (
276- inner : T ,
277- interceptor : F ,
278- ) -> InterceptedService < Self , F >
256+ pub fn with_interceptor < F > ( inner : T , interceptor : F ) -> InterceptedService < Self , F >
279257 where
280258 F : tonic:: service:: Interceptor ,
281259 {
@@ -331,15 +309,11 @@ pub mod pod_resources_lister_server {
331309 "/v1.PodResourcesLister/List" => {
332310 #[ allow( non_camel_case_types) ]
333311 struct ListSvc < T : PodResourcesLister > ( pub Arc < T > ) ;
334- impl <
335- T : PodResourcesLister ,
336- > tonic:: server:: UnaryService < super :: ListPodResourcesRequest >
337- for ListSvc < T > {
312+ impl < T : PodResourcesLister >
313+ tonic:: server:: UnaryService < super :: ListPodResourcesRequest > for ListSvc < T >
314+ {
338315 type Response = super :: ListPodResourcesResponse ;
339- type Future = BoxFuture <
340- tonic:: Response < Self :: Response > ,
341- tonic:: Status ,
342- > ;
316+ type Future = BoxFuture < tonic:: Response < Self :: Response > , tonic:: Status > ;
343317 fn call (
344318 & mut self ,
345319 request : tonic:: Request < super :: ListPodResourcesRequest > ,
@@ -377,26 +351,22 @@ pub mod pod_resources_lister_server {
377351 "/v1.PodResourcesLister/GetAllocatableResources" => {
378352 #[ allow( non_camel_case_types) ]
379353 struct GetAllocatableResourcesSvc < T : PodResourcesLister > ( pub Arc < T > ) ;
380- impl <
381- T : PodResourcesLister ,
382- > tonic :: server :: UnaryService < super :: AllocatableResourcesRequest >
383- for GetAllocatableResourcesSvc < T > {
354+ impl < T : PodResourcesLister >
355+ tonic :: server :: UnaryService < super :: AllocatableResourcesRequest >
356+ for GetAllocatableResourcesSvc < T >
357+ {
384358 type Response = super :: AllocatableResourcesResponse ;
385- type Future = BoxFuture <
386- tonic:: Response < Self :: Response > ,
387- tonic:: Status ,
388- > ;
359+ type Future = BoxFuture < tonic:: Response < Self :: Response > , tonic:: Status > ;
389360 fn call (
390361 & mut self ,
391362 request : tonic:: Request < super :: AllocatableResourcesRequest > ,
392363 ) -> Self :: Future {
393364 let inner = Arc :: clone ( & self . 0 ) ;
394365 let fut = async move {
395366 <T as PodResourcesLister >:: get_allocatable_resources (
396- & inner,
397- request,
398- )
399- . await
367+ & inner, request,
368+ )
369+ . await
400370 } ;
401371 Box :: pin ( fut)
402372 }
@@ -424,18 +394,14 @@ pub mod pod_resources_lister_server {
424394 } ;
425395 Box :: pin ( fut)
426396 }
427- _ => {
428- Box :: pin ( async move {
429- Ok (
430- http:: Response :: builder ( )
431- . status ( 200 )
432- . header ( "grpc-status" , "12" )
433- . header ( "content-type" , "application/grpc" )
434- . body ( empty_body ( ) )
435- . unwrap ( ) ,
436- )
437- } )
438- }
397+ _ => Box :: pin ( async move {
398+ Ok ( http:: Response :: builder ( )
399+ . status ( 200 )
400+ . header ( "grpc-status" , "12" )
401+ . header ( "content-type" , "application/grpc" )
402+ . body ( empty_body ( ) )
403+ . unwrap ( ) )
404+ } ) ,
439405 }
440406 }
441407 }
@@ -461,8 +427,7 @@ pub mod pod_resources_lister_server {
461427 write ! ( f, "{:?}" , self . 0 )
462428 }
463429 }
464- impl < T : PodResourcesLister > tonic:: server:: NamedService
465- for PodResourcesListerServer < T > {
430+ impl < T : PodResourcesLister > tonic:: server:: NamedService for PodResourcesListerServer < T > {
466431 const NAME : & ' static str = "v1.PodResourcesLister" ;
467432 }
468433}
0 commit comments