Turns successive Membership snapshots into discrete add/remove/update
callbacks.
Remarks
Membership.watch delivers the full live node set on every change;
reconciling that against the previous set is boilerplate every consumer would
otherwise repeat. This diffs consecutive snapshots and invokes
MembershipReconcilerHandlersonAdd/onRemove/onUpdate for exactly
what changed. Call MembershipReconciler.start to subscribe and the
returned/stop to unsubscribe.
Turns successive Membership snapshots into discrete add/remove/update callbacks.
Remarks
Membership.watchdelivers the full live node set on every change; reconciling that against the previous set is boilerplate every consumer would otherwise repeat. This diffs consecutive snapshots and invokes MembershipReconcilerHandlersonAdd/onRemove/onUpdatefor exactly what changed. Call MembershipReconciler.start to subscribe and the returned/stopto unsubscribe.