类 DestinationRuleOuterClass.Subset
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- istio.networking.v1alpha3.DestinationRuleOuterClass.Subset
-
- 所有已实现的接口:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,DestinationRuleOuterClass.SubsetOrBuilder,java.io.Serializable
public static final class DestinationRuleOuterClass.Subset extends com.google.protobuf.GeneratedMessageV3 implements DestinationRuleOuterClass.SubsetOrBuilder
A subset of endpoints of a service. Subsets can be used for scenarios like A/B testing, or routing to a specific version of a service. Refer to [VirtualService](https://istio.io/docs/reference/config/networking/virtual-service/#VirtualService) documentation for examples of using subsets in these scenarios. In addition, traffic policies defined at the service-level can be overridden at a subset-level. The following rule uses a round robin load balancing policy for all traffic going to a subset named testversion that is composed of endpoints (e.g., pods) with labels (version:v3). {{<tabset category-name="example">}} {{<tab name="v1alpha3" category-value="v1alpha3">}} ```yaml apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: LEAST_CONN subsets: - name: testversion labels: version: v3 trafficPolicy: loadBalancer: simple: ROUND_ROBIN ``` {{</tab>}} {{<tab name="v1beta1" category-value="v1beta1">}} ```yaml apiVersion: networking.istio.io/v1beta1 kind: DestinationRule metadata: name: bookinfo-ratings spec: host: ratings.prod.svc.cluster.local trafficPolicy: loadBalancer: simple: LEAST_CONN subsets: - name: testversion labels: version: v3 trafficPolicy: loadBalancer: simple: ROUND_ROBIN ``` {{</tab>}} {{</tabset>}} **Note:** Policies specified for subsets will not take effect until a route rule explicitly sends traffic to this subset. One or more labels are typically required to identify the subset destination, however, when the corresponding DestinationRule represents a host that supports multiple SNI hosts (e.g., an egress gateway), a subset without labels may be meaningful. In this case a traffic policy with [ClientTLSSettings](#ClientTLSSettings) can be used to identify a specific SNI host corresponding to the named subset.Protobuf typeistio.networking.v1alpha3.Subset- 另请参阅:
- 序列化表格
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classDestinationRuleOuterClass.Subset.BuilderA subset of endpoints of a service.private static classDestinationRuleOuterClass.Subset.LabelsDefaultEntryHolder-
从类继承的嵌套类/接口 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 DestinationRuleOuterClass.SubsetDEFAULT_INSTANCEprivate com.google.protobuf.MapField<java.lang.String,java.lang.String>labels_static intLABELS_FIELD_NUMBERprivate bytememoizedIsInitializedprivate java.lang.Objectname_static intNAME_FIELD_NUMBERprivate static com.google.protobuf.Parser<DestinationRuleOuterClass.Subset>PARSERprivate static longserialVersionUIDstatic intTRAFFIC_POLICY_FIELD_NUMBERprivate DestinationRuleOuterClass.TrafficPolicytrafficPolicy_
-
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 booleancontainsLabels(java.lang.String key)Labels apply a filter over the endpoints of a service in the service registry.booleanequals(java.lang.Object obj)static DestinationRuleOuterClass.SubsetgetDefaultInstance()DestinationRuleOuterClass.SubsetgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()java.util.Map<java.lang.String,java.lang.String>getLabels()已过时。intgetLabelsCount()Labels apply a filter over the endpoints of a service in the service registry.java.util.Map<java.lang.String,java.lang.String>getLabelsMap()Labels apply a filter over the endpoints of a service in the service registry.java.lang.StringgetLabelsOrDefault(java.lang.String key, java.lang.String defaultValue)Labels apply a filter over the endpoints of a service in the service registry.java.lang.StringgetLabelsOrThrow(java.lang.String key)Labels apply a filter over the endpoints of a service in the service registry.java.lang.StringgetName()Name of the subset.com.google.protobuf.ByteStringgetNameBytes()Name of the subset.com.google.protobuf.Parser<DestinationRuleOuterClass.Subset>getParserForType()intgetSerializedSize()DestinationRuleOuterClass.TrafficPolicygetTrafficPolicy()Traffic policies that apply to this subset.DestinationRuleOuterClass.TrafficPolicyOrBuildergetTrafficPolicyOrBuilder()Traffic policies that apply to this subset.com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()booleanhasTrafficPolicy()Traffic policies that apply to this subset.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()private com.google.protobuf.MapField<java.lang.String,java.lang.String>internalGetLabels()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static DestinationRuleOuterClass.Subset.BuildernewBuilder()static DestinationRuleOuterClass.Subset.BuildernewBuilder(DestinationRuleOuterClass.Subset prototype)DestinationRuleOuterClass.Subset.BuildernewBuilderForType()protected DestinationRuleOuterClass.Subset.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static DestinationRuleOuterClass.SubsetparseDelimitedFrom(java.io.InputStream input)static DestinationRuleOuterClass.SubsetparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DestinationRuleOuterClass.SubsetparseFrom(byte[] data)static DestinationRuleOuterClass.SubsetparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DestinationRuleOuterClass.SubsetparseFrom(com.google.protobuf.ByteString data)static DestinationRuleOuterClass.SubsetparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DestinationRuleOuterClass.SubsetparseFrom(com.google.protobuf.CodedInputStream input)static DestinationRuleOuterClass.SubsetparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DestinationRuleOuterClass.SubsetparseFrom(java.io.InputStream input)static DestinationRuleOuterClass.SubsetparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DestinationRuleOuterClass.SubsetparseFrom(java.nio.ByteBuffer data)static DestinationRuleOuterClass.SubsetparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<DestinationRuleOuterClass.Subset>parser()DestinationRuleOuterClass.Subset.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, isStringEmpty, 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
- 另请参阅:
- 常量字段值
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- 另请参阅:
- 常量字段值
-
name_
private volatile java.lang.Object name_
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
- 另请参阅:
- 常量字段值
-
labels_
private com.google.protobuf.MapField<java.lang.String,java.lang.String> labels_
-
TRAFFIC_POLICY_FIELD_NUMBER
public static final int TRAFFIC_POLICY_FIELD_NUMBER
- 另请参阅:
- 常量字段值
-
trafficPolicy_
private DestinationRuleOuterClass.TrafficPolicy trafficPolicy_
-
memoizedIsInitialized
private byte memoizedIsInitialized
-
DEFAULT_INSTANCE
private static final DestinationRuleOuterClass.Subset DEFAULT_INSTANCE
-
PARSER
private static final com.google.protobuf.Parser<DestinationRuleOuterClass.Subset> 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()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- 覆盖:
internalGetMapField在类中com.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- 指定者:
internalGetFieldAccessorTable在类中com.google.protobuf.GeneratedMessageV3
-
getName
public java.lang.String getName()
Name of the subset. The service name and the subset name can be used for traffic splitting in a route rule.
string name = 1 [(.google.api.field_behavior) = REQUIRED];- 指定者:
getName在接口中DestinationRuleOuterClass.SubsetOrBuilder- 返回:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Name of the subset. The service name and the subset name can be used for traffic splitting in a route rule.
string name = 1 [(.google.api.field_behavior) = REQUIRED];- 指定者:
getNameBytes在接口中DestinationRuleOuterClass.SubsetOrBuilder- 返回:
- The bytes for name.
-
internalGetLabels
private com.google.protobuf.MapField<java.lang.String,java.lang.String> internalGetLabels()
-
getLabelsCount
public int getLabelsCount()
Labels apply a filter over the endpoints of a service in the service registry. See route rules for examples of usage.
map<string, string> labels = 2;
-
containsLabels
public boolean containsLabels(java.lang.String key)
Labels apply a filter over the endpoints of a service in the service registry. See route rules for examples of usage.
map<string, string> labels = 2;
-
getLabels
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getLabels()
已过时。UsegetLabelsMap()instead.
-
getLabelsMap
public java.util.Map<java.lang.String,java.lang.String> getLabelsMap()
Labels apply a filter over the endpoints of a service in the service registry. See route rules for examples of usage.
map<string, string> labels = 2;
-
getLabelsOrDefault
public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue)Labels apply a filter over the endpoints of a service in the service registry. See route rules for examples of usage.
map<string, string> labels = 2;
-
getLabelsOrThrow
public java.lang.String getLabelsOrThrow(java.lang.String key)
Labels apply a filter over the endpoints of a service in the service registry. See route rules for examples of usage.
map<string, string> labels = 2;
-
hasTrafficPolicy
public boolean hasTrafficPolicy()
Traffic policies that apply to this subset. Subsets inherit the traffic policies specified at the DestinationRule level. Settings specified at the subset level will override the corresponding settings specified at the DestinationRule level.
.istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;- 指定者:
hasTrafficPolicy在接口中DestinationRuleOuterClass.SubsetOrBuilder- 返回:
- Whether the trafficPolicy field is set.
-
getTrafficPolicy
public DestinationRuleOuterClass.TrafficPolicy getTrafficPolicy()
Traffic policies that apply to this subset. Subsets inherit the traffic policies specified at the DestinationRule level. Settings specified at the subset level will override the corresponding settings specified at the DestinationRule level.
.istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;- 指定者:
getTrafficPolicy在接口中DestinationRuleOuterClass.SubsetOrBuilder- 返回:
- The trafficPolicy.
-
getTrafficPolicyOrBuilder
public DestinationRuleOuterClass.TrafficPolicyOrBuilder getTrafficPolicyOrBuilder()
Traffic policies that apply to this subset. Subsets inherit the traffic policies specified at the DestinationRule level. Settings specified at the subset level will override the corresponding settings specified at the DestinationRule level.
.istio.networking.v1alpha3.TrafficPolicy traffic_policy = 3;
-
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 DestinationRuleOuterClass.Subset parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(java.io.InputStream input) throws java.io.IOException
- 抛出:
java.io.IOException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- 抛出:
java.io.IOException
-
parseDelimitedFrom
public static DestinationRuleOuterClass.Subset parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- 抛出:
java.io.IOException
-
parseDelimitedFrom
public static DestinationRuleOuterClass.Subset parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- 抛出:
java.io.IOException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- 抛出:
java.io.IOException
-
parseFrom
public static DestinationRuleOuterClass.Subset parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- 抛出:
java.io.IOException
-
newBuilderForType
public DestinationRuleOuterClass.Subset.Builder newBuilderForType()
- 指定者:
newBuilderForType在接口中com.google.protobuf.Message- 指定者:
newBuilderForType在接口中com.google.protobuf.MessageLite
-
newBuilder
public static DestinationRuleOuterClass.Subset.Builder newBuilder()
-
newBuilder
public static DestinationRuleOuterClass.Subset.Builder newBuilder(DestinationRuleOuterClass.Subset prototype)
-
toBuilder
public DestinationRuleOuterClass.Subset.Builder toBuilder()
- 指定者:
toBuilder在接口中com.google.protobuf.Message- 指定者:
toBuilder在接口中com.google.protobuf.MessageLite
-
newBuilderForType
protected DestinationRuleOuterClass.Subset.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- 指定者:
newBuilderForType在类中com.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static DestinationRuleOuterClass.Subset getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<DestinationRuleOuterClass.Subset> parser()
-
getParserForType
public com.google.protobuf.Parser<DestinationRuleOuterClass.Subset> getParserForType()
- 指定者:
getParserForType在接口中com.google.protobuf.Message- 指定者:
getParserForType在接口中com.google.protobuf.MessageLite- 覆盖:
getParserForType在类中com.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public DestinationRuleOuterClass.Subset getDefaultInstanceForType()
- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageLiteOrBuilder- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageOrBuilder
-
-