Skip to main content

WatchCallback

Type Alias WatchCallback 

Source
pub type WatchCallback = Arc<dyn Fn(&DnsEvent) + Send + Sync>;
Expand description

Callback invoked by a backend’s event thread.

Must be Send + Sync because it runs on a native watcher thread. Keep it short: enqueue the event and return. Never call DnsManager::apply, Lease::restore, or other mutating APIs from inside the callback; doing so risks deadlock with the coalescer and reconciler threads.

Aliased Type§

pub struct WatchCallback { /* private fields */ }