File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ members = ["crates/*"]
3
3
resolver = " 2"
4
4
5
5
[workspace .package ]
6
- version = " 0.3.8 "
6
+ version = " 0.3.9 "
7
7
edition = " 2021"
8
8
publish = false
9
9
authors = [" FastEdge Development Team" ]
Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ where
234
234
app_name,
235
235
request. uri( )
236
236
) ;
237
- let cfg = match self . context . lookup ( & app_name) . await {
237
+ let cfg = match self . context . lookup_by_name ( & app_name) . await {
238
238
None => {
239
239
#[ cfg( feature = "metrics" ) ]
240
240
metrics:: metrics ( AppResult :: UNKNOWN ) ;
@@ -612,7 +612,7 @@ mod tests {
612
612
}
613
613
614
614
impl Router for TestContext {
615
- async fn lookup ( & self , _name : & str ) -> Option < App > {
615
+ async fn lookup_by_name ( & self , _name : & str ) -> Option < App > {
616
616
self . app . clone ( )
617
617
}
618
618
}
Original file line number Diff line number Diff line change @@ -314,7 +314,8 @@ pub trait ExecutorCache {
314
314
}
315
315
316
316
pub trait Router : Send + Sync {
317
- fn lookup ( & self , name : & str ) -> impl std:: future:: Future < Output = Option < App > > + Send ;
317
+ fn lookup_by_name ( & self , name : & str ) -> impl std:: future:: Future < Output = Option < App > > + Send ;
318
+ fn lookup_by_id ( & self , id : u64 ) -> impl std:: future:: Future < Output = Option < App > > + Send ;
318
319
}
319
320
320
321
pub fn componentize_if_necessary ( buffer : & [ u8 ] ) -> anyhow:: Result < Cow < [ u8 ] > > {
Original file line number Diff line number Diff line change @@ -246,9 +246,13 @@ impl ContextHeaders for CliContext<'_> {
246
246
}
247
247
248
248
impl Router for CliContext < ' _ > {
249
- async fn lookup ( & self , _name : & str ) -> Option < App > {
249
+ async fn lookup_by_name ( & self , _name : & str ) -> Option < App > {
250
250
self . app . to_owned ( )
251
251
}
252
+
253
+ async fn lookup_by_id ( & self , _id : u64 ) -> Option < App > {
254
+ unreachable ! ( )
255
+ }
252
256
}
253
257
254
258
impl StatsWriter for CliContext < ' _ > {
You can’t perform that action at this time.
0 commit comments