Expand description
Edge-role invalidation client (control plane).
When this proxy runs with role = "edge", EdgeClient::spawn
holds a long-lived SSE subscription against the home proxy’s
admin listener (GET /api/edge/subscribe, same bearer gate as
every other admin route). Each event: invalidate frame the home
pushes is applied to the local EdgeCache: matching entries are
dropped and the local version clock is advanced past the home’s
(observe_home_version), so reads cached after the event can
never be mistaken for pre-invalidation state.
Delivery is best-effort by design. A dropped connection is re-established with capped exponential backoff (the subscribe endpoint re-registers the edge on every connect), and any events missed while disconnected are covered by the cache TTL — the bounded-staleness contract from the module doc. The data plane (cache misses and writes) does NOT flow through here: it uses the ordinary PG-wire forwarding path with the home listed as this proxy’s backend node.
Structs§
- Edge
Client - Handle-less namespace for the edge-side subscribe loop.