Optional ReadonlyclearCancels a timer created by CachedProbeOptions.setTimer
(e.g. IRuntimeServices.clearTimeout).
Optional ReadonlyfallbackOutcome recorded when the probe times out or rejects.
Defaults to false — the policy this helper was built for, where a
backend that will not answer counts as unreachable. That is the right
answer when the probe reads the thing whose health is being reported.
It is the WRONG answer when the probe reads a proxy for that thing and
the proxy can fail independently: messaging-plugin's Service Bus probe
reads the namespace's MANAGEMENT plane to report on its DATA plane, so a
management endpoint that is firewalled, absent (the emulator ships no
TLS listener for it) or merely slow used to report a live, publishing
broker as down and drain the replica. Such a probe passes
fallback: undefined and widens T, so "I could not determine this"
stays distinguishable from "it is down".
ReadonlyhrtimeMonotonic clock in milliseconds (e.g. IRuntimeServices.hrtime()).
Injected so the TTL is an interval, not a wall-clock reading.
ReadonlyprobeThe reachability probe. Resolving true means the backend is reachable;
resolving false or rejecting means it is not.
A probe may resolve a wider outcome than boolean — see
CachedProbeOptions.fallback. T defaults to boolean, so
every existing caller is unchanged.
Optional ReadonlysetTimer used to bound each probe (e.g. IRuntimeServices.setTimeout).
Optional ReadonlytimeoutPer-probe timeout, in milliseconds. A probe that does not settle within
this window resolves CachedProbeOptions.fallback, which is
false — unreachable — unless the caller widened it.
Optional ReadonlyttlHow long to cache the last outcome, in milliseconds.
Options for
createCachedProbe.Since
0.1.0