Class ChaosFaultPipelineBuilderExtensions
Extension methods for adding chaos fault strategy to a ResiliencePipelineBuilder.
public static class ChaosFaultPipelineBuilderExtensions
- Inheritance
-
ChaosFaultPipelineBuilderExtensions
- Inherited Members
Methods
AddChaosFault<TBuilder>(TBuilder, ChaosFaultStrategyOptions)
Adds a fault chaos strategy to the builder.
public static TBuilder AddChaosFault<TBuilder>(this TBuilder builder, ChaosFaultStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase
Parameters
builder
TBuilderThe builder instance.
options
ChaosFaultStrategyOptionsThe fault strategy options.
Returns
- TBuilder
The same builder instance.
Type Parameters
TBuilder
The builder type.
AddChaosFault<TBuilder>(TBuilder, double, Func<Exception?>)
Adds a fault chaos strategy to the builder.
public static TBuilder AddChaosFault<TBuilder>(this TBuilder builder, double injectionRate, Func<Exception?> faultGenerator) 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).
faultGenerator
Func<Exception>The exception generator delegate.
Returns
- TBuilder
The same builder instance.
Type Parameters
TBuilder
The builder type.