add feature flag to ospf route

This commit is contained in:
sijie.sun
2024-09-21 18:15:47 +08:00
committed by Sijie.Sun
parent 06afd221d5
commit bd60cfc2a0
12 changed files with 124 additions and 43 deletions
+2
View File
@@ -53,6 +53,7 @@ message Route {
common.StunInfo stun_info = 7;
string inst_id = 8;
string version = 9;
common.PeerFeatureFlag feature_flag = 10;
}
message NodeInfo {
@@ -65,6 +66,7 @@ message NodeInfo {
repeated string listeners = 7;
string config = 8;
string version = 9;
common.PeerFeatureFlag feature_flag = 10;
}
message ShowNodeInfoRequest {}
+5
View File
@@ -90,3 +90,8 @@ message StunInfo {
uint32 min_port = 5;
uint32 max_port = 6;
}
message PeerFeatureFlag {
bool is_public_server = 1;
bool no_relay_data = 2;
}
+1
View File
@@ -18,6 +18,7 @@ message RoutePeerInfo {
uint32 version = 9;
string easytier_version = 10;
common.PeerFeatureFlag feature_flag = 11;
}
message PeerIdVersion {
@@ -84,6 +84,10 @@ impl ServiceRegistry {
self.table.remove(&key).map(|_| ())
}
pub fn unregister_by_domain(&self, domain_name: &str) {
self.table.retain(|k, _| k.domain_name != domain_name);
}
pub async fn call_method(
&self,
rpc_desc: RpcDescriptor,