Class HTTPFaultInjection
HTTPFaultInjection can be used to specify one or more faults to inject while forwarding HTTP requests to the destination specified in a route. Fault specification is part of a V1VirtualService rule. Faults include aborting the Http request from downstream service, and/or delaying proxying of requests. A fault rule MUST HAVE delay or abort or both.
Namespace: Neon.Kube.Resources.Istio
Assembly: Neon.Kube.Resources.dll
Syntax
public class HTTPFaultInjection
Remarks
Note: Delay and abort faults are independent of one another, even if both are specified simultaneously.
Constructors
HTTPFaultInjection()
Initializes a new instance of the HTTPFaultInjection class.
Declaration
public HTTPFaultInjection()
Properties
Abort
Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty.
Declaration
[JsonProperty(PropertyName = "abort", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Abort Abort { get; set; }
Property Value
Type | Description |
---|---|
Abort |
Delay
Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc.
Declaration
[JsonProperty(PropertyName = "delay", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Delay Delay { get; set; }
Property Value
Type | Description |
---|---|
Delay |
Methods
Validate()
Validate the object.
Declaration
public virtual void Validate()
Exceptions
Type | Condition |
---|---|
ValidationException | Thrown if validation fails. |