TimeSpan RequestTimeout { get; init; }
Source
Gets the finite positive per-request maximum; defaults to three seconds.
Waits for an explicit status-only HTTP condition under one cooperative monotonic deadline.
Task WaitAsync(HttpClient client, Uri endpoint, string probePath, TimeSpan timeout, HttpReadinessOptions? options = null, CancellationToken cancellationToken = default)
Sends headers-only GET requests until the status condition succeeds or a bound is reached.
client
endpoint
probePath
timeout
options
cancellationToken
Completion only after the declared condition passes inside the original budget.
Never reads response bodies, mutates the client, or logs raw exceptions. Redirect behavior belongs to the client; initial-origin validation is not a redirect sandbox. Non-cooperative callbacks can outlast the budget.
Task WaitAsync(HttpClient client, Uri endpoint, string probePath, TimeSpan timeout, HttpReadinessOptions? options, CancellationToken cancellationToken, TimeProvider timeProvider)
Clock seam for deterministic timer and cancellation verification.
void ValidateProbePath(string probePath)
Validates the path without requiring an allocated endpoint; adapters call before acquisition.
Uri ResolveProbeUri(Uri endpoint, string probePath)
Resolves and checks HTTP(S) scheme, IDN host, and effective port before dispatch.
Task WaitCoreAsync(HttpClient client, Uri endpoint, string probePath, HttpReadinessSettings settings, ReadinessDeadline deadline)
Shared core used by adapters with their original deadline and validated option snapshot.
Configures one HTTP readiness operation; values are snapshotted before work begins.
TimeSpan RequestTimeout { get; init; }
Source
Gets the finite positive per-request maximum; defaults to three seconds.
TimeSpan RetryDelay { get; init; }
Source
Gets the finite positive delay between failed attempts; defaults to 250 milliseconds.
Func<HttpStatusCode, bool> IsSuccess { get; init; }
Source
Gets the synchronous status-only predicate; defaults to exact HTTP 200. Exceptions terminate the operation.
int? MaxAttempts { get; init; }
Source
Gets the optional positive request cap; null means the deadline alone bounds attempts.
Immutable validated settings shared by the public probe and hosting adapters.
RequestTimeout
RetryDelay
IsSuccess
MaxAttempts
HttpReadinessSettings Snapshot(HttpReadinessOptions options)
Validates and snapshots options without acquiring resources or invoking callbacks.
One monotonic cooperative budget preserving caller and deadline cancellation identities.
void ValidateDuration(TimeSpan duration, string parameterName)
Validates finite positive durations supported by BCL timers before acquiring resources.
void Check(ReadinessPhase phase, ReadinessAttempt last = default)
Checks caller first, then original deadline, then adapter shutdown; never resets the budget.
The single sequential operation retains only safe latest HTTP scalars so post-probe cleanup checks keep attempt/cause diagnostics. A deadline instance must not be shared across independent concurrent waits.
void Dispose()
Releases timers and links after all cooperative work has settled.
TimeProvider TimeProvider { get; }
Source
Gets the provider used for monotonic measurements, timers, and delays.
CancellationToken Token { get; }
Source
Gets cooperative cancellation for work; errors must be checked with Check
.
TimeSpan Remaining { get; }
Source
Gets the remaining original budget, clamped to zero.
Preserves fatal cleanup leaves before an adapter summarizes a secondary failure.
Each adapter supplies its existing fatal-type policy; aggregate traversal does not broaden that policy.
Exception? FindFatal(Exception exception, Func<Exception, bool> isFatal)
Finds the first fatal exception in depth-first aggregate order without replacing its identity.
exception
isFatal
The original fatal exception, or null when every leaf is nonfatal.
Traversal uses an explicit stack so aggregate nesting does not consume the runtime call stack.
void ThrowIfFatal(Exception exception, Func<Exception, bool> isFatal)
Rethrows an original fatal leaf before a failure can be converted into safe secondary metadata.
exception
isFatal
Describes a generated readiness failure without retaining request data or raw transport exceptions.
Original factory, build, predicate, and programming errors remain their original exceptions. Caller cancellation remains an OperationCanceledException
carrying the original token.
string SafeCleanupType(Type? type)
Maps cleanup types to a fixed BCL allowlist; arbitrary names and exception instances are never retained.
ReadinessPhase Phase { get; }
Source
Gets the phase active at failure.
ReadinessFailureCategory Category { get; }
Source
Gets the terminal failure category.
ReadinessFailureCategory? LastCause { get; }
Source
Gets the last retryable HTTP cause, or null before any failed attempt.
HttpStatusCode? LastStatusCode { get; }
Source
Gets the last rejected status; null for transport, timeout, or no attempt.
HttpRequestError? LastHttpRequestError { get; }
Source
Gets only the last transport error enum; null for other causes.
int Attempts { get; }
Source
Gets the number of requests dispatched.
string Problem { get; }
Source
Gets a fixed safe problem description.
string Cause { get; }
Source
Gets a fixed safe explanation.
string NextAction { get; }
Source
Gets a fixed safe next check.
string DocumentationUrl { get; }
Source
Gets the canonical troubleshooting reference; it contains no request data.
Constant-space safe state of the most recent HTTP attempt; never stores a request, response, or exception.
Attempts
LastCause
Status
HttpError
Identifies the phase that failed to complete under the readiness budget.
Safe failure categories; deadline and attempt-limit errors retain the last HTTP cause separately.