27 references to Endpoint
Microsoft.Extensions.Http.Resilience (9)
Hedging\Internals\Validators\HttpStandardHedgingResilienceOptionsCustomValidator.cs (6)
17
if (options.
Endpoint
.Timeout.Timeout > options.TotalRequestTimeout.Timeout)
21
$"Attempt Timeout: {options.
Endpoint
.Timeout.Timeout.TotalSeconds}s");
24
var timeout = TimeSpan.FromMilliseconds(options.
Endpoint
.Timeout.Timeout.TotalMilliseconds * CircuitBreakerTimeoutMultiplier);
25
if (options.
Endpoint
.CircuitBreaker.SamplingDuration < timeout)
29
$"Sampling Duration: {options.
Endpoint
.CircuitBreaker.SamplingDuration.TotalSeconds}s," +
30
$"Attempt Timeout: {options.
Endpoint
.Timeout.Timeout.TotalSeconds}s");
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (3)
137
.AddRateLimiter(options.
Endpoint
.RateLimiter)
138
.AddCircuitBreaker(options.
Endpoint
.CircuitBreaker)
139
.AddTimeout(options.
Endpoint
.Timeout);
Microsoft.Extensions.Http.Resilience.Tests (18)
Hedging\HttpStandardHedgingResilienceOptionsCustomValidatorTests.cs (11)
19
options.
Endpoint
.CircuitBreaker.SamplingDuration = TimeSpan.FromSeconds(1);
46
options.
Endpoint
.Timeout.Timeout = options.TotalRequestTimeout.Timeout;
47
options.
Endpoint
.CircuitBreaker.SamplingDuration = TimeSpan.FromMilliseconds(options.
Endpoint
.Timeout.Timeout.TotalMilliseconds * 2);
51
options.
Endpoint
.Timeout.Timeout = options.TotalRequestTimeout.Timeout;
52
options.
Endpoint
.CircuitBreaker.SamplingDuration =
53
TimeSpan.FromMilliseconds(options.
Endpoint
.Timeout.Timeout.TotalMilliseconds * 2) + TimeSpan.FromMilliseconds(10);
83
options.
Endpoint
.Timeout.Timeout = TimeSpan.FromSeconds(3);
91
options.
Endpoint
.Timeout.Timeout = options.TotalRequestTimeout.Timeout;
92
options.
Endpoint
.CircuitBreaker.SamplingDuration = TimeSpan.FromMilliseconds(options.
Endpoint
.Timeout.Timeout.TotalMilliseconds / 2);
Hedging\HttpStandardHedgingResilienceOptionsTests.cs (4)
23
_options.
Endpoint
.Timeout.Timeout.Should().Be(TimeSpan.FromSeconds(10));
27
_options.
Endpoint
.CircuitBreaker.Name.Should().Be("StandardHedging-CircuitBreaker");
28
_options.
Endpoint
.Timeout.Name.Should().Be("StandardHedging-AttemptTimeout");
29
_options.
Endpoint
.RateLimiter.Name.Should().Be("StandardHedging-RateLimiter");
Hedging\StandardHedgingTests.cs (3)
329
opt.
Endpoint
.CircuitBreaker.FailureRatio = 0.99;
330
opt.
Endpoint
.CircuitBreaker.SamplingDuration = TimeSpan.FromSeconds(900);
332
opt.
Endpoint
.Timeout.Timeout = TimeSpan.FromSeconds(200);