nzrdns: remove some todo!()s

This commit is contained in:
snow flurry 2024-08-18 21:05:29 -07:00
parent f0772b10e2
commit 459682d182
2 changed files with 8 additions and 6 deletions

View file

@ -8,7 +8,7 @@ use thiserror::Error;
use crate::model;
#[derive(Clone, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum ResourceAction {
/// The referenced resource was created.
Created,

View file

@ -34,8 +34,8 @@ async fn event_handler<T: AsyncRead>(zones: ZoneData, mut events: EventClient<T>
tracing::error!("Unable to delete record {}: {err}", ent.name);
}
}
ResourceAction::Modified => {
todo!();
misc => {
tracing::debug!("ignoring instance action {misc:?}");
}
}
}
@ -54,8 +54,8 @@ async fn event_handler<T: AsyncRead>(zones: ZoneData, mut events: EventClient<T>
zones.delete_zone(&ent.name).await;
}
}
ResourceAction::Modified => {
todo!();
misc => {
tracing::debug!("ignoring subnet action {misc:?}");
}
}
}
@ -64,6 +64,8 @@ async fn event_handler<T: AsyncRead>(zones: ZoneData, mut events: EventClient<T>
}
}
}
tracing::warn!("No more events! (did Nazrin shut down?)");
}
/// Hydrates all existing DNS zones.
@ -154,7 +156,7 @@ async fn main() -> ExitCode {
tokio::select! {
_ = event_handler(zones.clone(), events) => {
todo!();
// nothing to do here
},
res = dns_listener.block_until_done() => {
if let Err(err) = res {