mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-30 07:49:30 +00:00
client: add DnsPeerManager and rpc
This commit is contained in:
@@ -4,11 +4,6 @@ import "common.proto";
|
||||
|
||||
package dns;
|
||||
|
||||
message DnsConfigPb {
|
||||
repeated ZoneConfigPb zones = 1;
|
||||
string fqdn = 2;
|
||||
}
|
||||
|
||||
message ZoneConfigPb {
|
||||
common.UUID id = 1;
|
||||
string origin = 2;
|
||||
@@ -23,13 +18,25 @@ message DnsSnapshot {
|
||||
repeated common.Url listeners = 3;
|
||||
}
|
||||
|
||||
message DnsHeartbeat {
|
||||
common.UUID inst_id = 1;
|
||||
uint64 checksum = 2;
|
||||
optional DnsSnapshot data = 3;
|
||||
message GetExportConfigRequest {}
|
||||
|
||||
message GetExportConfigResponse {
|
||||
repeated ZoneConfigPb zones = 1;
|
||||
string fqdn = 2;
|
||||
}
|
||||
|
||||
service DnsServerRpc {
|
||||
rpc Heartbeat(DnsHeartbeat) returns (common.Void) {}
|
||||
rpc GetConfig(common.Void) returns (DnsConfigPb) {}
|
||||
service DnsPeerManagerRpc {
|
||||
rpc GetExportConfig(GetExportConfigRequest) returns (GetExportConfigResponse) {}
|
||||
}
|
||||
|
||||
message HeartbeatRequest {
|
||||
common.UUID id = 1;
|
||||
bytes digest = 2;
|
||||
optional DnsSnapshot snapshot = 3;
|
||||
}
|
||||
|
||||
message HeartbeatResponse {}
|
||||
|
||||
service DnsServerRpc {
|
||||
rpc Heartbeat(HeartbeatRequest) returns (HeartbeatResponse) {}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,12 @@ pub trait DeterministicDigest: Serialize {
|
||||
}
|
||||
}
|
||||
|
||||
impl DeterministicDigest for DnsConfigPb {}
|
||||
impl DeterministicDigest for GetExportConfigResponse {}
|
||||
|
||||
impl DeterministicDigest for ZoneConfigPb {}
|
||||
|
||||
impl DeterministicDigest for DnsSnapshot {}
|
||||
|
||||
impl Display for ZoneConfigPb {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
writeln!(f, "; EasyTier Magic DNS zone file")?;
|
||||
|
||||
Reference in New Issue
Block a user