Class ChaosLatencyStrategyOptions
Represents the options for the latency chaos strategy.
public class ChaosLatencyStrategyOptions : ChaosStrategyOptions
- Inheritance
-
ChaosLatencyStrategyOptions
- Inherited Members
Constructors
ChaosLatencyStrategyOptions()
Initializes a new instance of the ChaosLatencyStrategyOptions class.
public ChaosLatencyStrategyOptions()
Properties
Latency
Gets or sets the latency to be injected for a given execution.
public TimeSpan Latency { get; set; }
Property Value
- TimeSpan
Defaults to
30
seconds. When LatencyGenerator is specified, this property is ignored.
LatencyGenerator
Gets or sets the latency generator that generates the delay for a given execution.
public Func<LatencyGeneratorArguments, ValueTask<TimeSpan>>? LatencyGenerator { get; set; }
Property Value
- Func<LatencyGeneratorArguments, ValueTask<TimeSpan>>
Defaults to null. When this property is null the Latency is used.
OnLatencyInjected
Gets or sets the delegate that's raised when a latency is injected.
public Func<OnLatencyInjectedArguments, ValueTask>? OnLatencyInjected { get; set; }
Property Value
- Func<OnLatencyInjectedArguments, ValueTask>
Defaults to null.