类 VirtualServiceOuterClass.HTTPFaultInjection.Abort.Builder

  • 所有已实现的接口:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder, java.lang.Cloneable
    封闭类:
    VirtualServiceOuterClass.HTTPFaultInjection.Abort

    public static final class VirtualServiceOuterClass.HTTPFaultInjection.Abort.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<VirtualServiceOuterClass.HTTPFaultInjection.Abort.Builder>
    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