mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-03 01:25:37 +00:00
proto: add update method to HeartbeatRequest
This commit is contained in:
@@ -1,7 +1,15 @@
|
|||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
use crate::utils::DeterministicDigest;
|
||||||
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/dns.rs"));
|
include!(concat!(env!("OUT_DIR"), "/dns.rs"));
|
||||||
|
|
||||||
|
impl HeartbeatRequest {
|
||||||
|
pub fn update(&mut self, snapshot: DnsSnapshot) {
|
||||||
|
self.digest = snapshot.digest();
|
||||||
|
self.snapshot = Some(snapshot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Display for ZoneData {
|
impl Display for ZoneData {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
writeln!(f, "; EasyTier Magic DNS zone data")?;
|
writeln!(f, "; EasyTier Magic DNS zone data")?;
|
||||||
|
|||||||
Reference in New Issue
Block a user