Class ChaosLatencyPipelineBuilderExtensions
Extension methods for adding chaos latency strategies to a ResiliencePipelineBuilderBase.
public static class ChaosLatencyPipelineBuilderExtensions
- Inheritance
-
ChaosLatencyPipelineBuilderExtensions
- Inherited Members
Methods
AddChaosLatency<TBuilder>(TBuilder, ChaosLatencyStrategyOptions)
Adds a latency chaos strategy to the builder.
public static TBuilder AddChaosLatency<TBuilder>(this TBuilder builder, ChaosLatencyStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase
Parameters
builder
TBuilderThe builder instance.
options
ChaosLatencyStrategyOptionsThe latency options.
Returns
- TBuilder
The same builder instance.
Type Parameters
TBuilder
The builder type.
Exceptions
- ArgumentNullException
Thrown when
builder
oroptions
is null.- ValidationException
Thrown when
options
are invalid.
AddChaosLatency<TBuilder>(TBuilder, double, TimeSpan)
Adds a latency chaos strategy to the builder.
public static TBuilder AddChaosLatency<TBuilder>(this TBuilder builder, double injectionRate, TimeSpan latency) where TBuilder : ResiliencePipelineBuilderBase
Parameters
builder
TBuilderThe builder instance.
injectionRate
doubleThe injection rate for a given execution, which the value should be between [0, 1] (inclusive).
latency
TimeSpanThe delay value.
Returns
- TBuilder
The same builder instance.
Type Parameters
TBuilder
The builder type.
Exceptions
- ArgumentNullException
Thrown when
builder
is null.- ValidationException
Thrown when the options produced from the arguments are invalid.