类 VirtualServiceOuterClass.HTTPFaultInjection.Abort

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
istio.networking.v1alpha3.VirtualServiceOuterClass.HTTPFaultInjection.Abort
所有已实现的接口:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder, Serializable
封闭类:
VirtualServiceOuterClass.HTTPFaultInjection

public static final class VirtualServiceOuterClass.HTTPFaultInjection.Abort extends com.google.protobuf.GeneratedMessageV3 implements VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder
 Abort specification is used to prematurely abort a request with a
 pre-specified error code. The following example will return an HTTP 400
 error code for 1 out of every 1000 requests to the "ratings" service "v1".

 {{<tabset category-name="example">}}
 {{<tab name="v1alpha3" category-value="v1alpha3">}}
 ```yaml
 apiVersion: networking.istio.io/v1alpha3
 kind: VirtualService
 metadata:
   name: ratings-route
 spec:
   hosts:
   - ratings.prod.svc.cluster.local
   http:
   - route:
     - destination:
         host: ratings.prod.svc.cluster.local
         subset: v1
     fault:
       abort:
         percentage:
           value: 0.1
         httpStatus: 400
 ```
 {{</tab>}}

 {{<tab name="v1beta1" category-value="v1beta1">}}
 ```yaml
 apiVersion: networking.istio.io/v1beta1
 kind: VirtualService
 metadata:
   name: ratings-route
 spec:
   hosts:
   - ratings.prod.svc.cluster.local
   http:
   - route:
     - destination:
         host: ratings.prod.svc.cluster.local
         subset: v1
     fault:
       abort:
         percentage:
           value: 0.1
         httpStatus: 400
 ```
 {{</tab>}}
 {{</tabset>}}

 The _httpStatus_ field is used to indicate the HTTP status code to
 return to the caller. The optional _percentage_ field can be used to only
 abort a certain percentage of requests. If not specified, all requests are
 aborted.
 
Protobuf type istio.networking.v1alpha3.HTTPFaultInjection.Abort
另请参阅: