2017-03-31 14:20:03 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2017-04-06 16:59:17 +02:00
|
|
|
|
namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http.Policies
|
2017-03-31 14:20:03 +02:00
|
|
|
|
{
|
2017-04-04 13:19:22 -07:00
|
|
|
|
internal class CircuitBreakerPolicy : ResiliencePolicy
|
2017-03-31 14:20:03 +02:00
|
|
|
|
{
|
|
|
|
|
public CircuitBreakerPolicy(int exceptionsAllowedBeforeBreaking, int durationOfBreakInMinutes)
|
|
|
|
|
{
|
|
|
|
|
ExceptionsAllowedBeforeBreaking = exceptionsAllowedBeforeBreaking;
|
|
|
|
|
DurationOfBreakInMinutes = durationOfBreakInMinutes;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int ExceptionsAllowedBeforeBreaking { get; }
|
|
|
|
|
public int DurationOfBreakInMinutes { get; }
|
|
|
|
|
}
|
|
|
|
|
}
|