pub type SearchResolver = Arc<dyn Fn(String, Option<SocketAddr>) -> Pin<Box<dyn Future<Output = bool> + Send>> + Send + Sync>;Expand description
Async hook invoked by PvDatabase::has_name when a name is not yet
in the database. Used by the CA gateway and similar proxy components
to lazily populate PVs on first search.
The resolver should:
- Determine whether the name should be served (e.g., check ACL)
- Take whatever action is needed to make
has_namereturn true on a subsequent call (e.g., subscribe to an upstream IOC and calladd_pvwith a placeholder value) - Return
trueif the name is now resolvable,falseotherwise
Returning true causes has_name to re-check the database. The
resolver may take some time (TCP search, upstream connect handshake);
the caller (UDP search responder, TCP CREATE_CHANNEL handler) will
.await it.
The second argument is the downstream client’s socket address when
the lookup originates from a CA/PVA search or channel-create on
behalf of an identified peer (None for host-less internal lookups:
preload, iocsh, link processing). the CA gateway needs
this to evaluate .pvlist DENY FROM host rules at search time, the
way C ca-gateway’s pvExistTest passes the client host to
gateAs::findEntry.
Aliased Type§
pub struct SearchResolver { /* private fields */ }