@@ -45,8 +45,8 @@ pub struct InterfaceIndexConfirmation {
45
45
/// Generated client implementations.
46
46
pub mod backends_client {
47
47
#![ allow( unused_variables, dead_code, missing_docs, clippy:: let_unit_value) ]
48
- use tonic:: codegen:: http:: Uri ;
49
48
use tonic:: codegen:: * ;
49
+ use tonic:: codegen:: http:: Uri ;
50
50
#[ derive( Debug , Clone ) ]
51
51
pub struct BackendsClient < T > {
52
52
inner : tonic:: client:: Grpc < T > ,
@@ -90,8 +90,9 @@ pub mod backends_client {
90
90
<T as tonic:: client:: GrpcService < tonic:: body:: BoxBody > >:: ResponseBody ,
91
91
> ,
92
92
> ,
93
- <T as tonic:: codegen:: Service < http:: Request < tonic:: body:: BoxBody > > >:: Error :
94
- Into < StdError > + Send + Sync ,
93
+ <T as tonic:: codegen:: Service <
94
+ http:: Request < tonic:: body:: BoxBody > ,
95
+ > >:: Error : Into < StdError > + Send + Sync ,
95
96
{
96
97
BackendsClient :: new ( InterceptedService :: new ( inner, interceptor) )
97
98
}
@@ -129,16 +130,23 @@ pub mod backends_client {
129
130
pub async fn get_interface_index (
130
131
& mut self ,
131
132
request : impl tonic:: IntoRequest < super :: PodIp > ,
132
- ) -> std:: result:: Result < tonic:: Response < super :: InterfaceIndexConfirmation > , tonic:: Status >
133
- {
134
- self . inner . ready ( ) . await . map_err ( |e| {
135
- tonic:: Status :: new (
136
- tonic:: Code :: Unknown ,
137
- format ! ( "Service was not ready: {}" , e. into( ) ) ,
138
- )
139
- } ) ?;
133
+ ) -> std:: result:: Result <
134
+ tonic:: Response < super :: InterfaceIndexConfirmation > ,
135
+ tonic:: Status ,
136
+ > {
137
+ self . inner
138
+ . ready ( )
139
+ . await
140
+ . map_err ( |e| {
141
+ tonic:: Status :: new (
142
+ tonic:: Code :: Unknown ,
143
+ format ! ( "Service was not ready: {}" , e. into( ) ) ,
144
+ )
145
+ } ) ?;
140
146
let codec = tonic:: codec:: ProstCodec :: default ( ) ;
141
- let path = http:: uri:: PathAndQuery :: from_static ( "/backends.backends/GetInterfaceIndex" ) ;
147
+ let path = http:: uri:: PathAndQuery :: from_static (
148
+ "/backends.backends/GetInterfaceIndex" ,
149
+ ) ;
142
150
let mut req = request. into_request ( ) ;
143
151
req. extensions_mut ( )
144
152
. insert ( GrpcMethod :: new ( "backends.backends" , "GetInterfaceIndex" ) ) ;
@@ -148,34 +156,38 @@ pub mod backends_client {
148
156
& mut self ,
149
157
request : impl tonic:: IntoRequest < super :: Targets > ,
150
158
) -> std:: result:: Result < tonic:: Response < super :: Confirmation > , tonic:: Status > {
151
- self . inner . ready ( ) . await . map_err ( |e| {
152
- tonic:: Status :: new (
153
- tonic:: Code :: Unknown ,
154
- format ! ( "Service was not ready: {}" , e. into( ) ) ,
155
- )
156
- } ) ?;
159
+ self . inner
160
+ . ready ( )
161
+ . await
162
+ . map_err ( |e| {
163
+ tonic:: Status :: new (
164
+ tonic:: Code :: Unknown ,
165
+ format ! ( "Service was not ready: {}" , e. into( ) ) ,
166
+ )
167
+ } ) ?;
157
168
let codec = tonic:: codec:: ProstCodec :: default ( ) ;
158
169
let path = http:: uri:: PathAndQuery :: from_static ( "/backends.backends/Update" ) ;
159
170
let mut req = request. into_request ( ) ;
160
- req. extensions_mut ( )
161
- . insert ( GrpcMethod :: new ( "backends.backends" , "Update" ) ) ;
171
+ req. extensions_mut ( ) . insert ( GrpcMethod :: new ( "backends.backends" , "Update" ) ) ;
162
172
self . inner . unary ( req, path, codec) . await
163
173
}
164
174
pub async fn delete (
165
175
& mut self ,
166
176
request : impl tonic:: IntoRequest < super :: Vip > ,
167
177
) -> std:: result:: Result < tonic:: Response < super :: Confirmation > , tonic:: Status > {
168
- self . inner . ready ( ) . await . map_err ( |e| {
169
- tonic:: Status :: new (
170
- tonic:: Code :: Unknown ,
171
- format ! ( "Service was not ready: {}" , e. into( ) ) ,
172
- )
173
- } ) ?;
178
+ self . inner
179
+ . ready ( )
180
+ . await
181
+ . map_err ( |e| {
182
+ tonic:: Status :: new (
183
+ tonic:: Code :: Unknown ,
184
+ format ! ( "Service was not ready: {}" , e. into( ) ) ,
185
+ )
186
+ } ) ?;
174
187
let codec = tonic:: codec:: ProstCodec :: default ( ) ;
175
188
let path = http:: uri:: PathAndQuery :: from_static ( "/backends.backends/Delete" ) ;
176
189
let mut req = request. into_request ( ) ;
177
- req. extensions_mut ( )
178
- . insert ( GrpcMethod :: new ( "backends.backends" , "Delete" ) ) ;
190
+ req. extensions_mut ( ) . insert ( GrpcMethod :: new ( "backends.backends" , "Delete" ) ) ;
179
191
self . inner . unary ( req, path, codec) . await
180
192
}
181
193
}
@@ -190,7 +202,10 @@ pub mod backends_server {
190
202
async fn get_interface_index (
191
203
& self ,
192
204
request : tonic:: Request < super :: PodIp > ,
193
- ) -> std:: result:: Result < tonic:: Response < super :: InterfaceIndexConfirmation > , tonic:: Status > ;
205
+ ) -> std:: result:: Result <
206
+ tonic:: Response < super :: InterfaceIndexConfirmation > ,
207
+ tonic:: Status ,
208
+ > ;
194
209
async fn update (
195
210
& self ,
196
211
request : tonic:: Request < super :: Targets > ,
@@ -223,7 +238,10 @@ pub mod backends_server {
223
238
max_encoding_message_size : None ,
224
239
}
225
240
}
226
- pub fn with_interceptor < F > ( inner : T , interceptor : F ) -> InterceptedService < Self , F >
241
+ pub fn with_interceptor < F > (
242
+ inner : T ,
243
+ interceptor : F ,
244
+ ) -> InterceptedService < Self , F >
227
245
where
228
246
F : tonic:: service:: Interceptor ,
229
247
{
@@ -279,12 +297,21 @@ pub mod backends_server {
279
297
"/backends.backends/GetInterfaceIndex" => {
280
298
#[ allow( non_camel_case_types) ]
281
299
struct GetInterfaceIndexSvc < T : Backends > ( pub Arc < T > ) ;
282
- impl < T : Backends > tonic:: server:: UnaryService < super :: PodIp > for GetInterfaceIndexSvc < T > {
300
+ impl < T : Backends > tonic:: server:: UnaryService < super :: PodIp >
301
+ for GetInterfaceIndexSvc < T > {
283
302
type Response = super :: InterfaceIndexConfirmation ;
284
- type Future = BoxFuture < tonic:: Response < Self :: Response > , tonic:: Status > ;
285
- fn call ( & mut self , request : tonic:: Request < super :: PodIp > ) -> Self :: Future {
303
+ type Future = BoxFuture <
304
+ tonic:: Response < Self :: Response > ,
305
+ tonic:: Status ,
306
+ > ;
307
+ fn call (
308
+ & mut self ,
309
+ request : tonic:: Request < super :: PodIp > ,
310
+ ) -> Self :: Future {
286
311
let inner = Arc :: clone ( & self . 0 ) ;
287
- let fut = async move { ( * inner) . get_interface_index ( request) . await } ;
312
+ let fut = async move {
313
+ ( * inner) . get_interface_index ( request) . await
314
+ } ;
288
315
Box :: pin ( fut)
289
316
}
290
317
}
@@ -314,9 +341,13 @@ pub mod backends_server {
314
341
"/backends.backends/Update" => {
315
342
#[ allow( non_camel_case_types) ]
316
343
struct UpdateSvc < T : Backends > ( pub Arc < T > ) ;
317
- impl < T : Backends > tonic:: server:: UnaryService < super :: Targets > for UpdateSvc < T > {
344
+ impl < T : Backends > tonic:: server:: UnaryService < super :: Targets >
345
+ for UpdateSvc < T > {
318
346
type Response = super :: Confirmation ;
319
- type Future = BoxFuture < tonic:: Response < Self :: Response > , tonic:: Status > ;
347
+ type Future = BoxFuture <
348
+ tonic:: Response < Self :: Response > ,
349
+ tonic:: Status ,
350
+ > ;
320
351
fn call (
321
352
& mut self ,
322
353
request : tonic:: Request < super :: Targets > ,
@@ -352,10 +383,17 @@ pub mod backends_server {
352
383
"/backends.backends/Delete" => {
353
384
#[ allow( non_camel_case_types) ]
354
385
struct DeleteSvc < T : Backends > ( pub Arc < T > ) ;
355
- impl < T : Backends > tonic:: server:: UnaryService < super :: Vip > for DeleteSvc < T > {
386
+ impl < T : Backends > tonic:: server:: UnaryService < super :: Vip >
387
+ for DeleteSvc < T > {
356
388
type Response = super :: Confirmation ;
357
- type Future = BoxFuture < tonic:: Response < Self :: Response > , tonic:: Status > ;
358
- fn call ( & mut self , request : tonic:: Request < super :: Vip > ) -> Self :: Future {
389
+ type Future = BoxFuture <
390
+ tonic:: Response < Self :: Response > ,
391
+ tonic:: Status ,
392
+ > ;
393
+ fn call (
394
+ & mut self ,
395
+ request : tonic:: Request < super :: Vip > ,
396
+ ) -> Self :: Future {
359
397
let inner = Arc :: clone ( & self . 0 ) ;
360
398
let fut = async move { ( * inner) . delete ( request) . await } ;
361
399
Box :: pin ( fut)
@@ -384,14 +422,18 @@ pub mod backends_server {
384
422
} ;
385
423
Box :: pin ( fut)
386
424
}
387
- _ => Box :: pin ( async move {
388
- Ok ( http:: Response :: builder ( )
389
- . status ( 200 )
390
- . header ( "grpc-status" , "12" )
391
- . header ( "content-type" , "application/grpc" )
392
- . body ( empty_body ( ) )
393
- . unwrap ( ) )
394
- } ) ,
425
+ _ => {
426
+ Box :: pin ( async move {
427
+ Ok (
428
+ http:: Response :: builder ( )
429
+ . status ( 200 )
430
+ . header ( "grpc-status" , "12" )
431
+ . header ( "content-type" , "application/grpc" )
432
+ . body ( empty_body ( ) )
433
+ . unwrap ( ) ,
434
+ )
435
+ } )
436
+ }
395
437
}
396
438
}
397
439
}
0 commit comments