pub type ExistenceGate = Arc<dyn Fn(String, Option<SocketAddr>) -> Pin<Box<dyn Future<Output = bool> + Send>> + Send + Sync>;Expand description
Per-request admission gate for an already-registered simple PV.
A plain IOC’s simple PVs are authoritative: once registered they
exist unconditionally, so no gate is installed and the cached-PV
short-circuit in PvDatabase::find_entry_from /
PvDatabase::has_name_from is unchanged. A CA gateway is
different — its shadow PVs are projections of an upstream that can be
host-denied for a given requester or disconnected — so it installs a
gate that the lookup path consults before returning a cached simple
PV. Returning false makes the database answer “does not exist” for
that requester, exactly as C ca-gateway’s pvExistTest returns
pverDoesNotExistHere for a host-denied or disconnected PV
(gateServer.cc:1516-1637) — without removing the PV object, so its
cached value stays available for diagnostics and re-admission.
The first argument is the filter-suffix-stripped record path (the
same key the simple-PV map and the gateway cache use); the second is
the requesting peer (None for host-less internal lookups). The gate
governs only simple PVs — records and aliases are never
gateway-managed and bypass it.
Aliased Type§
pub struct ExistenceGate { /* private fields */ }