Linx.Netlink.Rtnl.Reconcile.Source (Linx v0.1.0)

Copy Markdown View Source

Linx.Reconcile.Source adapter for rtnetlink — lets the generic Linx.Reconcile loop drive Linx.Netlink.Rtnl.Reconcile and Linx.Netlink.Rtnl.Monitor.

The scope is a Linx.Netlink.Socket.netns/0 (:host, {:pid, n}, {:path, p}). Each pass opens a short-lived rtnetlink socket in that namespace, runs the ordered single-shot reconcile, and closes it — so the loop owns no socket lifecycle, and the per-namespace scoping that makes reconcilers unable to fight each other (see the reconcile design notes) falls out for free. subscribe/2 starts a Monitor on the same namespace for low-latency wakeups; on ENOBUFS it emits :resync_needed, which the loop treats like any other hint — look now, re-diff full state.

This is a thin delegation; for direct control use Linx.Netlink.Rtnl.Reconcile.