Class CircuitBreaker
- Namespace
- DotCompute.Backends.Metal.Telemetry
- Assembly
- DotCompute.Backends.Metal.dll
Circuit breaker
public sealed class CircuitBreaker
- Inheritance
-
CircuitBreaker
- Inherited Members
Constructors
CircuitBreaker(string, int, TimeSpan)
Circuit breaker
public CircuitBreaker(string name, int threshold, TimeSpan timeout)
Parameters
Properties
CurrentState
Gets the current state of the circuit breaker
public CircuitBreakerState CurrentState { get; }
Property Value
Name
public string Name { get; }
Property Value
State
public CircuitBreakerState State { get; }
Property Value
Methods
GetState()
Gets the current state of the circuit breaker (API compatibility method).
public CircuitBreakerState GetState()
Returns
RecordFailure()
public void RecordFailure()
RecordSuccess()
public void RecordSuccess()