Table of Contents

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

name string
threshold int
timeout TimeSpan

Properties

CurrentState

Gets the current state of the circuit breaker

public CircuitBreakerState CurrentState { get; }

Property Value

CircuitBreakerState

Name

public string Name { get; }

Property Value

string

State

public CircuitBreakerState State { get; }

Property Value

CircuitBreakerState

Methods

GetState()

Gets the current state of the circuit breaker (API compatibility method).

public CircuitBreakerState GetState()

Returns

CircuitBreakerState

RecordFailure()

public void RecordFailure()

RecordSuccess()

public void RecordSuccess()