public static final class VirtualServiceOuterClass.HTTPFaultInjection.Delay extends com.google.protobuf.GeneratedMessageV3 implements VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilder
Delay specification is used to inject latency into the request
forwarding path. The following example will introduce a 5 second delay
in 1 out of every 1000 requests to the "v1" version of the "reviews"
service from all pods with label env: prod
{{<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:
- match:
- sourceLabels:
env: prod
route:
- destination:
host: reviews.prod.svc.cluster.local
subset: v1
fault:
delay:
percentage:
value: 0.1
fixedDelay: 5s
```
{{</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:
- match:
- sourceLabels:
env: prod
route:
- destination:
host: reviews.prod.svc.cluster.local
subset: v1
fault:
delay:
percentage:
value: 0.1
fixedDelay: 5s
```
{{</tab>}}
{{</tabset>}}
The _fixedDelay_ field is used to indicate the amount of delay in seconds.
The optional _percentage_ field can be used to only delay a certain
percentage of requests. If left unspecified, all request will be delayed.
Protobuf type istio.networking.v1alpha3.HTTPFaultInjection.Delay| 限定符和类型 | 类和说明 |
|---|---|
static class |
VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder
Delay specification is used to inject latency into the request
forwarding path.
|
static class |
VirtualServiceOuterClass.HTTPFaultInjection.Delay.HttpDelayTypeCase |
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| 限定符和类型 | 字段和说明 |
|---|---|
static int |
EXPONENTIAL_DELAY_FIELD_NUMBER |
static int |
FIXED_DELAY_FIELD_NUMBER |
static int |
PERCENT_FIELD_NUMBER |
static int |
PERCENTAGE_FIELD_NUMBER |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
getDefaultInstance() |
VirtualServiceOuterClass.HTTPFaultInjection.Delay |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Duration |
getExponentialDelay()
$hide_from_docs
.google.protobuf.Duration exponential_delay = 3; |
com.google.protobuf.DurationOrBuilder |
getExponentialDelayOrBuilder()
$hide_from_docs
.google.protobuf.Duration exponential_delay = 3; |
com.google.protobuf.Duration |
getFixedDelay()
Add a fixed delay before forwarding the request.
|
com.google.protobuf.DurationOrBuilder |
getFixedDelayOrBuilder()
Add a fixed delay before forwarding the request.
|
VirtualServiceOuterClass.HTTPFaultInjection.Delay.HttpDelayTypeCase |
getHttpDelayTypeCase() |
com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Delay> |
getParserForType() |
int |
getPercent()
已过时。
istio.networking.v1alpha3.HTTPFaultInjection.Delay.percent is deprecated.
See networking/v1alpha3/virtual_service.proto;l=1742
|
VirtualServiceOuterClass.Percent |
getPercentage()
Percentage of requests on which the delay will be injected.
|
VirtualServiceOuterClass.PercentOrBuilder |
getPercentageOrBuilder()
Percentage of requests on which the delay will be injected.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasExponentialDelay()
$hide_from_docs
.google.protobuf.Duration exponential_delay = 3; |
boolean |
hasFixedDelay()
Add a fixed delay before forwarding the request.
|
int |
hashCode() |
boolean |
hasPercentage()
Percentage of requests on which the delay will be injected.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder |
newBuilder() |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder |
newBuilder(VirtualServiceOuterClass.HTTPFaultInjection.Delay prototype) |
VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder |
newBuilderForType() |
protected VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseDelimitedFrom(InputStream input) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(byte[] data) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(ByteBuffer data) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(com.google.protobuf.ByteString data) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(com.google.protobuf.CodedInputStream input) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(InputStream input) |
static VirtualServiceOuterClass.HTTPFaultInjection.Delay |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Delay> |
parser() |
VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTopublic static final int PERCENT_FIELD_NUMBER
public static final int FIXED_DELAY_FIELD_NUMBER
public static final int EXPONENTIAL_DELAY_FIELD_NUMBER
public static final int PERCENTAGE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance 在类中 com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields 在接口中 com.google.protobuf.MessageOrBuildergetUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3public VirtualServiceOuterClass.HTTPFaultInjection.Delay.HttpDelayTypeCase getHttpDelayTypeCase()
@Deprecated public int getPercent()
Percentage of requests on which the delay will be injected (0-100). Use of integer `percent` value is deprecated. Use the double `percentage` field instead.
int32 percent = 1 [deprecated = true];getPercent 在接口中 VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilderpublic boolean hasFixedDelay()
Add a fixed delay before forwarding the request. Format: 1h/1m/1s/1ms. MUST be >=1ms.
.google.protobuf.Duration fixed_delay = 2 [(.google.api.field_behavior) = REQUIRED];hasFixedDelay 在接口中 VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilderpublic com.google.protobuf.Duration getFixedDelay()
Add a fixed delay before forwarding the request. Format: 1h/1m/1s/1ms. MUST be >=1ms.
.google.protobuf.Duration fixed_delay = 2 [(.google.api.field_behavior) = REQUIRED];getFixedDelay 在接口中 VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilderpublic com.google.protobuf.DurationOrBuilder getFixedDelayOrBuilder()
Add a fixed delay before forwarding the request. Format: 1h/1m/1s/1ms. MUST be >=1ms.
.google.protobuf.Duration fixed_delay = 2 [(.google.api.field_behavior) = REQUIRED];public boolean hasExponentialDelay()
$hide_from_docs
.google.protobuf.Duration exponential_delay = 3;hasExponentialDelay 在接口中 VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilderpublic com.google.protobuf.Duration getExponentialDelay()
$hide_from_docs
.google.protobuf.Duration exponential_delay = 3;getExponentialDelay 在接口中 VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilderpublic com.google.protobuf.DurationOrBuilder getExponentialDelayOrBuilder()
$hide_from_docs
.google.protobuf.Duration exponential_delay = 3;public boolean hasPercentage()
Percentage of requests on which the delay will be injected.
.istio.networking.v1alpha3.Percent percentage = 5;hasPercentage 在接口中 VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilderpublic VirtualServiceOuterClass.Percent getPercentage()
Percentage of requests on which the delay will be injected.
.istio.networking.v1alpha3.Percent percentage = 5;getPercentage 在接口中 VirtualServiceOuterClass.HTTPFaultInjection.DelayOrBuilderpublic VirtualServiceOuterClass.PercentOrBuilder getPercentageOrBuilder()
Percentage of requests on which the delay will be injected.
.istio.networking.v1alpha3.Percent percentage = 5;public final boolean isInitialized()
isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilderisInitialized 在类中 com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo 在接口中 com.google.protobuf.MessageLitewriteTo 在类中 com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize 在接口中 com.google.protobuf.MessageLitegetSerializedSize 在类中 com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals 在接口中 com.google.protobuf.Messageequals 在类中 com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode 在接口中 com.google.protobuf.MessagehashCode 在类中 com.google.protobuf.AbstractMessagepublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(InputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder newBuilderForType()
newBuilderForType 在接口中 com.google.protobuf.MessagenewBuilderForType 在接口中 com.google.protobuf.MessageLitepublic static VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder newBuilder()
public static VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder newBuilder(VirtualServiceOuterClass.HTTPFaultInjection.Delay prototype)
public VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder toBuilder()
toBuilder 在接口中 com.google.protobuf.MessagetoBuilder 在接口中 com.google.protobuf.MessageLiteprotected VirtualServiceOuterClass.HTTPFaultInjection.Delay.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3public static VirtualServiceOuterClass.HTTPFaultInjection.Delay getDefaultInstance()
public static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Delay> parser()
public com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Delay> getParserForType()
getParserForType 在接口中 com.google.protobuf.MessagegetParserForType 在接口中 com.google.protobuf.MessageLitegetParserForType 在类中 com.google.protobuf.GeneratedMessageV3public VirtualServiceOuterClass.HTTPFaultInjection.Delay getDefaultInstanceForType()
getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilderCopyright © 2018–2023 Alibaba Group. All rights reserved.