类 VirtualServiceOuterClass.HTTPRouteDestination

  • 所有已实现的接口:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder, java.io.Serializable
    封闭类:
    VirtualServiceOuterClass

    public static final class VirtualServiceOuterClass.HTTPRouteDestination
    extends com.google.protobuf.GeneratedMessageV3
    implements VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder
     Each routing rule is associated with one or more service versions (see
     glossary in beginning of document). Weights associated with the version
     determine the proportion of traffic it receives. For example, the
     following rule will route 25% of traffic for the "reviews" service to
     instances with the "v2" tag and the remaining traffic (i.e., 75%) to
     "v1".
     {{<tabset category-name="example">}}
     {{<tab name="v1alpha3" category-value="v1alpha3">}}
     ```yaml
     apiVersion: networking.istio.io/v1alpha3
     kind: VirtualService
     metadata:
       name: reviews-route
     spec:
       hosts:
       - reviews.prod.svc.cluster.local
       http:
       - route:
         - destination:
             host: reviews.prod.svc.cluster.local
             subset: v2
           weight: 25
         - destination:
             host: reviews.prod.svc.cluster.local
             subset: v1
           weight: 75
     ```
     {{</tab>}}
     {{<tab name="v1beta1" category-value="v1beta1">}}
     ```yaml
     apiVersion: networking.istio.io/v1beta1
     kind: VirtualService
     metadata:
       name: reviews-route
     spec:
       hosts:
       - reviews.prod.svc.cluster.local
       http:
       - route:
         - destination:
             host: reviews.prod.svc.cluster.local
             subset: v2
           weight: 25
         - destination:
             host: reviews.prod.svc.cluster.local
             subset: v1
           weight: 75
     ```
     {{</tab>}}
     {{</tabset>}}
     And the associated DestinationRule
     {{<tabset category-name="example">}}
     {{<tab name="v1alpha3" category-value="v1alpha3">}}
     ```yaml
     apiVersion: networking.istio.io/v1alpha3
     kind: DestinationRule
     metadata:
       name: reviews-destination
     spec:
       host: reviews.prod.svc.cluster.local
       subsets:
       - name: v1
         labels:
           version: v1
       - name: v2
         labels:
           version: v2
     ```
     {{</tab>}}
     {{<tab name="v1beta1" category-value="v1beta1">}}
     ```yaml
     apiVersion: networking.istio.io/v1beta1
     kind: DestinationRule
     metadata:
       name: reviews-destination
     spec:
       host: reviews.prod.svc.cluster.local
       subsets:
       - name: v1
         labels:
           version: v1
       - name: v2
         labels:
           version: v2
     ```
     {{</tab>}}
     {{</tabset>}}
     Traffic can also be split across two entirely different services without
     having to define new subsets. For example, the following rule forwards 25% of
     traffic to reviews.com to dev.reviews.com
     {{<tabset category-name="example">}}
     {{<tab name="v1alpha3" category-value="v1alpha3">}}
     ```yaml
     apiVersion: networking.istio.io/v1alpha3
     kind: VirtualService
     metadata:
       name: reviews-route-two-domains
     spec:
       hosts:
       - reviews.com
       http:
       - route:
         - destination:
             host: dev.reviews.com
           weight: 25
         - destination:
             host: reviews.com
           weight: 75
     ```
     {{</tab>}}
     {{<tab name="v1beta1" category-value="v1beta1">}}
     ```yaml
     apiVersion: networking.istio.io/v1beta1
     kind: VirtualService
     metadata:
       name: reviews-route-two-domains
     spec:
       hosts:
       - reviews.com
       http:
       - route:
         - destination:
             host: dev.reviews.com
           weight: 25
         - destination:
             host: reviews.com
           weight: 75
     ```
     {{</tab>}}
     {{</tabset>}}
     
    Protobuf type istio.networking.v1alpha3.HTTPRouteDestination
    另请参阅:
    序列化表格
    • 构造器详细资料

      • HTTPRouteDestination

        private HTTPRouteDestination​(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
      • HTTPRouteDestination

        private HTTPRouteDestination()
    • 方法详细资料

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        覆盖:
        newInstance 在类中 com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        指定者:
        getUnknownFields 在接口中 com.google.protobuf.MessageOrBuilder
        覆盖:
        getUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        指定者:
        internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3
      • hasDestination

        public boolean hasDestination()
         Destination uniquely identifies the instances of a service
         to which the request/connection should be forwarded to.
         
        .istio.networking.v1alpha3.Destination destination = 1 [(.google.api.field_behavior) = REQUIRED];
        指定者:
        hasDestination 在接口中 VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder
        返回:
        Whether the destination field is set.
      • getWeight

        public int getWeight()
         The proportion of traffic to be forwarded to the service
         version. (0-100). Sum of weights across destinations SHOULD BE == 100.
         If there is only one destination in a rule, the weight value is assumed to
         be 100.
         
        int32 weight = 2;
        指定者:
        getWeight 在接口中 VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder
        返回:
        The weight.
      • isInitialized

        public final boolean isInitialized()
        指定者:
        isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilder
        覆盖:
        isInitialized 在类中 com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        指定者:
        writeTo 在接口中 com.google.protobuf.MessageLite
        覆盖:
        writeTo 在类中 com.google.protobuf.GeneratedMessageV3
        抛出:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        指定者:
        getSerializedSize 在接口中 com.google.protobuf.MessageLite
        覆盖:
        getSerializedSize 在类中 com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        指定者:
        equals 在接口中 com.google.protobuf.Message
        覆盖:
        equals 在类中 com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        指定者:
        hashCode 在接口中 com.google.protobuf.Message
        覆盖:
        hashCode 在类中 com.google.protobuf.AbstractMessage
      • parseFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseFrom​(java.nio.ByteBuffer data)
                                                                       throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseFrom​(java.nio.ByteBuffer data,
                                                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                       throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseFrom​(com.google.protobuf.ByteString data)
                                                                       throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseFrom​(com.google.protobuf.ByteString data,
                                                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                       throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseFrom​(byte[] data,
                                                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                       throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseFrom​(java.io.InputStream input,
                                                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                       throws java.io.IOException
        抛出:
        java.io.IOException
      • parseDelimitedFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseDelimitedFrom​(java.io.InputStream input,
                                                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                                throws java.io.IOException
        抛出:
        java.io.IOException
      • parseFrom

        public static VirtualServiceOuterClass.HTTPRouteDestination parseFrom​(com.google.protobuf.CodedInputStream input,
                                                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                       throws java.io.IOException
        抛出:
        java.io.IOException
      • getParserForType

        public com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRouteDestination> getParserForType()
        指定者:
        getParserForType 在接口中 com.google.protobuf.Message
        指定者:
        getParserForType 在接口中 com.google.protobuf.MessageLite
        覆盖:
        getParserForType 在类中 com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public VirtualServiceOuterClass.HTTPRouteDestination getDefaultInstanceForType()
        指定者:
        getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuilder
        指定者:
        getDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilder