PolicyHealthSnapshot

data class PolicyHealthSnapshot(val circuitBreaker: CircuitBreakerSnapshot? = null, val bulkhead: BulkheadSnapshot? = null, val rateLimiter: RateLimiterSnapshot? = null, val retry: RetrySnapshot? = null, val cache: CacheSnapshot? = null)

Point-in-time snapshot of policy state for health/readiness endpoints and metrics.

Use ResilientPolicy.getHealthSnapshot to build this. Expose it in your health endpoint (e.g. Kubernetes readiness/liveness, or a /health API) so load balancers and orchestrators can decide whether to route traffic.

This is a source-compatible addition. Trailing nullable fields with defaults ensure existing consumers compile without modification.

Constructors

Link copied to clipboard
constructor(circuitBreaker: CircuitBreakerSnapshot? = null, bulkhead: BulkheadSnapshot? = null, rateLimiter: RateLimiterSnapshot? = null, retry: RetrySnapshot? = null, cache: CacheSnapshot? = null)

Properties

Link copied to clipboard

Snapshot of bulkhead usage; null if no bulkhead was configured or the implementation does not support snapshot.

Link copied to clipboard

Snapshot of cache usage and hit rate; null if no cache was configured.

Link copied to clipboard

Snapshot of circuit breaker state and counters; null if no circuit breaker was configured.

Link copied to clipboard

Snapshot of rate limiter token state; null if no rate limiter was configured.

Link copied to clipboard

Snapshot of retry configuration; null if no retry was configured.