#[non_exhaustive]pub enum Event {
Route {
id: Id<Route>,
kind: ChangeKind,
},
Interface {
id: Id<Interface>,
kind: ChangeKind,
},
Neighbor {
id: Id<NeighborEntry>,
kind: ChangeKind,
},
Address {
id: Id<InterfaceAddress>,
kind: ChangeKind,
},
ResyncRequired {
domain: EventDomain,
},
}Expand description
A signal that something changed in the system’s networking state —
carrying an ID and a ChangeKind, not a clone of the full domain
object.
Deliberately signal-shaped rather than snapshot-shaped (e.g.
Event::Route { id, kind }, not Event::RouteAdded(Route)): native
change notifications frequently don’t hand over the full object in the
first place (an RTM_NEWROUTE message or a Windows route-change
callback can carry only what changed, not a complete record), and a
consumer that only cares that something changed before deciding
whether to re-query it shouldn’t pay for a clone of the full object on
every event. A consumer that needs the current value re-reads it
through the relevant provider (Lattice::routes(), keyed by the ID
carried here).
#[non_exhaustive]: DNS resolver configuration changes are a stated
long-term goal for this enum (see ARCHITECTURE.md) but are not emitted
by any backend yet — no platform in Stage 0.8 exposes a push
notification for /etc/resolv.conf/per-adapter DNS settings changing
without resorting to filesystem polling, which isn’t a genuine push
signal. Adding a Dns variant later is not a breaking change for
consumers who already match non-exhaustively.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Route
Interface
Neighbor
Address
ResyncRequired
Notifications were dropped because the bounded queue filled; re-read the indicated domain before relying on later signals.
Fields
domain: EventDomain