add cli command for global foreign network info

This commit is contained in:
sijie.sun
2024-09-22 22:18:13 +08:00
committed by Sijie.Sun
parent aca9a0e35b
commit 783ba50c9e
6 changed files with 142 additions and 7 deletions

View File

@@ -4,7 +4,9 @@ use dashmap::DashMap;
use crate::{
common::PeerId,
proto::peer_rpc::{ForeignNetworkRouteInfoEntry, ForeignNetworkRouteInfoKey},
proto::peer_rpc::{
ForeignNetworkRouteInfoEntry, ForeignNetworkRouteInfoKey, RouteForeignNetworkInfos,
},
};
#[derive(Clone, Debug)]
@@ -79,6 +81,10 @@ pub trait Route {
None
}
async fn list_foreign_network_info(&self) -> RouteForeignNetworkInfos {
Default::default()
}
async fn set_route_cost_fn(&self, _cost_fn: RouteCostCalculator) {}
async fn dump(&self) -> String {