Class Delay
Delay specification is used to inject latency into the request forwarding path. The following example will introduce a 5 second delay in 1 out of every 1000 requests to the “v1” version of the “reviews” service from all pods with label env: prod
Namespace: Neon.Kube.Resources.Istio
Assembly: Neon.Kube.Resources.dll
Syntax
public class Delay
Constructors
Delay()
Initializes a new instance of the HTTPFaultInjection.Delay class.
Declaration
public Delay()
Properties
FixedDelay
Add a fixed delay before forwarding the request. Format: 1h/1m/1s/1ms. MUST be >=1ms.
Declaration
[JsonProperty(PropertyName = "fixedDelay", Required = Required.Always, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string FixedDelay { get; set; }
Property Value
Type | Description |
---|---|
string |
Percent
Percentage of requests on which the delay will be injected (0-100). Use of integer percent value is deprecated. Use the double percentage field instead.
Declaration
[JsonProperty(PropertyName = "percent", Required = Required.Always, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int? Percent { get; set; }
Property Value
Type | Description |
---|---|
int? |
Percentage
Add a fixed delay before forwarding the request. Format: 1h/1m/1s/1ms. MUST be >=1ms.
Declaration
[JsonProperty(PropertyName = "percentage", Required = Required.Always, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Percent Percentage { get; set; }
Property Value
Type | Description |
---|---|
Percent |
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate()
Exceptions
Type | Condition |
---|---|
ValidationException | Thrown if validation fails. |