类 VirtualServiceOuterClass.HTTPRouteDestination
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- istio.networking.v1alpha3.VirtualServiceOuterClass.HTTPRouteDestination
-
- 所有已实现的接口:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder,java.io.Serializable
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 typeistio.networking.v1alpha3.HTTPRouteDestination- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classVirtualServiceOuterClass.HTTPRouteDestination.BuilderEach routing rule is associated with one or more service versions (see glossary in beginning of document).-
从类继承的嵌套类/接口 com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
字段概要
字段 修饰符和类型 字段 说明 private static VirtualServiceOuterClass.HTTPRouteDestinationDEFAULT_INSTANCEprivate VirtualServiceOuterClass.Destinationdestination_static intDESTINATION_FIELD_NUMBERprivate VirtualServiceOuterClass.Headersheaders_static intHEADERS_FIELD_NUMBERprivate bytememoizedIsInitializedprivate static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRouteDestination>PARSERprivate static longserialVersionUIDprivate intweight_static intWEIGHT_FIELD_NUMBER
-
构造器概要
构造器 限定符 构造器 说明 privateHTTPRouteDestination()privateHTTPRouteDestination(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object obj)static VirtualServiceOuterClass.HTTPRouteDestinationgetDefaultInstance()VirtualServiceOuterClass.HTTPRouteDestinationgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()VirtualServiceOuterClass.DestinationgetDestination()Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to.VirtualServiceOuterClass.DestinationOrBuildergetDestinationOrBuilder()Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to.VirtualServiceOuterClass.HeadersgetHeaders()Header manipulation rulesVirtualServiceOuterClass.HeadersOrBuildergetHeadersOrBuilder()Header manipulation rulescom.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRouteDestination>getParserForType()intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()intgetWeight()The proportion of traffic to be forwarded to the service version. (0-100).booleanhasDestination()Destination uniquely identifies the instances of a service to which the request/connection should be forwarded to.inthashCode()booleanhasHeaders()Header manipulation rulesprotected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static VirtualServiceOuterClass.HTTPRouteDestination.BuildernewBuilder()static VirtualServiceOuterClass.HTTPRouteDestination.BuildernewBuilder(VirtualServiceOuterClass.HTTPRouteDestination prototype)VirtualServiceOuterClass.HTTPRouteDestination.BuildernewBuilderForType()protected VirtualServiceOuterClass.HTTPRouteDestination.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static VirtualServiceOuterClass.HTTPRouteDestinationparseDelimitedFrom(java.io.InputStream input)static VirtualServiceOuterClass.HTTPRouteDestinationparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(byte[] data)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(com.google.protobuf.ByteString data)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(com.google.protobuf.CodedInputStream input)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(java.io.InputStream input)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(java.nio.ByteBuffer data)static VirtualServiceOuterClass.HTTPRouteDestinationparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRouteDestination>parser()VirtualServiceOuterClass.HTTPRouteDestination.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
从类继承的方法 com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
从类继承的方法 com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
-
-
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID
- 另请参阅:
- 常量字段值
-
DESTINATION_FIELD_NUMBER
public static final int DESTINATION_FIELD_NUMBER
- 另请参阅:
- 常量字段值
-
destination_
private VirtualServiceOuterClass.Destination destination_
-
WEIGHT_FIELD_NUMBER
public static final int WEIGHT_FIELD_NUMBER
- 另请参阅:
- 常量字段值
-
weight_
private int weight_
-
HEADERS_FIELD_NUMBER
public static final int HEADERS_FIELD_NUMBER
- 另请参阅:
- 常量字段值
-
headers_
private VirtualServiceOuterClass.Headers headers_
-
memoizedIsInitialized
private byte memoizedIsInitialized
-
DEFAULT_INSTANCE
private static final VirtualServiceOuterClass.HTTPRouteDestination DEFAULT_INSTANCE
-
PARSER
private static final com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRouteDestination> PARSER
-
-
方法详细资料
-
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.
-
getDestination
public VirtualServiceOuterClass.Destination getDestination()
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];- 指定者:
getDestination在接口中VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder- 返回:
- The destination.
-
getDestinationOrBuilder
public VirtualServiceOuterClass.DestinationOrBuilder getDestinationOrBuilder()
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];
-
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.
-
hasHeaders
public boolean hasHeaders()
Header manipulation rules
.istio.networking.v1alpha3.Headers headers = 7;- 指定者:
hasHeaders在接口中VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder- 返回:
- Whether the headers field is set.
-
getHeaders
public VirtualServiceOuterClass.Headers getHeaders()
Header manipulation rules
.istio.networking.v1alpha3.Headers headers = 7;- 指定者:
getHeaders在接口中VirtualServiceOuterClass.HTTPRouteDestinationOrBuilder- 返回:
- The headers.
-
getHeadersOrBuilder
public VirtualServiceOuterClass.HeadersOrBuilder getHeadersOrBuilder()
Header manipulation rules
.istio.networking.v1alpha3.Headers headers = 7;
-
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) 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) throws java.io.IOException
- 抛出:
java.io.IOException
-
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) 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) 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
-
newBuilderForType
public VirtualServiceOuterClass.HTTPRouteDestination.Builder newBuilderForType()
- 指定者:
newBuilderForType在接口中com.google.protobuf.Message- 指定者:
newBuilderForType在接口中com.google.protobuf.MessageLite
-
newBuilder
public static VirtualServiceOuterClass.HTTPRouteDestination.Builder newBuilder()
-
newBuilder
public static VirtualServiceOuterClass.HTTPRouteDestination.Builder newBuilder(VirtualServiceOuterClass.HTTPRouteDestination prototype)
-
toBuilder
public VirtualServiceOuterClass.HTTPRouteDestination.Builder toBuilder()
- 指定者:
toBuilder在接口中com.google.protobuf.Message- 指定者:
toBuilder在接口中com.google.protobuf.MessageLite
-
newBuilderForType
protected VirtualServiceOuterClass.HTTPRouteDestination.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- 指定者:
newBuilderForType在类中com.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static VirtualServiceOuterClass.HTTPRouteDestination getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRouteDestination> parser()
-
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
-
-