public static final class VirtualServiceOuterClass.HTTPRetry extends com.google.protobuf.GeneratedMessageV3 implements VirtualServiceOuterClass.HTTPRetryOrBuilder
Describes the retry policy to use when a HTTP request fails. For
example, the following rule sets the maximum number of retries to 3 when
calling ratings:v1 service, with a 2s timeout per retry attempt.
{{<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
retries:
attempts: 3
perTryTimeout: 2s
retryOn: gateway-error,connect-failure,refused-stream
```
{{</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
retries:
attempts: 3
perTryTimeout: 2s
retryOn: gateway-error,connect-failure,refused-stream
```
{{</tab>}}
{{</tabset>}}
Protobuf type istio.networking.v1alpha3.HTTPRetry| 限定符和类型 | 类和说明 |
|---|---|
static class |
VirtualServiceOuterClass.HTTPRetry.Builder
Describes the retry policy to use when a HTTP request fails.
|
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 |
ATTEMPTS_FIELD_NUMBER |
static int |
PER_TRY_TIMEOUT_FIELD_NUMBER |
static int |
RETRY_ON_FIELD_NUMBER |
static int |
RETRY_REMOTE_LOCALITIES_FIELD_NUMBER |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj) |
int |
getAttempts()
Number of retries to be allowed for a given request.
|
static VirtualServiceOuterClass.HTTPRetry |
getDefaultInstance() |
VirtualServiceOuterClass.HTTPRetry |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRetry> |
getParserForType() |
com.google.protobuf.Duration |
getPerTryTimeout()
Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms.
|
com.google.protobuf.DurationOrBuilder |
getPerTryTimeoutOrBuilder()
Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms.
|
String |
getRetryOn()
Specifies the conditions under which retry takes place.
|
com.google.protobuf.ByteString |
getRetryOnBytes()
Specifies the conditions under which retry takes place.
|
com.google.protobuf.BoolValue |
getRetryRemoteLocalities()
Flag to specify whether the retries should retry to other localities.
|
com.google.protobuf.BoolValueOrBuilder |
getRetryRemoteLocalitiesOrBuilder()
Flag to specify whether the retries should retry to other localities.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasPerTryTimeout()
Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms.
|
boolean |
hasRetryRemoteLocalities()
Flag to specify whether the retries should retry to other localities.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static VirtualServiceOuterClass.HTTPRetry.Builder |
newBuilder() |
static VirtualServiceOuterClass.HTTPRetry.Builder |
newBuilder(VirtualServiceOuterClass.HTTPRetry prototype) |
VirtualServiceOuterClass.HTTPRetry.Builder |
newBuilderForType() |
protected VirtualServiceOuterClass.HTTPRetry.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static VirtualServiceOuterClass.HTTPRetry |
parseDelimitedFrom(InputStream input) |
static VirtualServiceOuterClass.HTTPRetry |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(byte[] data) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(ByteBuffer data) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(com.google.protobuf.ByteString data) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(com.google.protobuf.CodedInputStream input) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(InputStream input) |
static VirtualServiceOuterClass.HTTPRetry |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRetry> |
parser() |
VirtualServiceOuterClass.HTTPRetry.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 ATTEMPTS_FIELD_NUMBER
public static final int PER_TRY_TIMEOUT_FIELD_NUMBER
public static final int RETRY_ON_FIELD_NUMBER
public static final int RETRY_REMOTE_LOCALITIES_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 int getAttempts()
Number of retries to be allowed for a given request. The interval between retries will be determined automatically (25ms+). When request `timeout` of the [HTTP route](https://istio.io/docs/reference/config/networking/virtual-service/#HTTPRoute) or `per_try_timeout` is configured, the actual number of retries attempted also depends on the specified request `timeout` and `per_try_timeout` values.
int32 attempts = 1 [(.google.api.field_behavior) = REQUIRED];getAttempts 在接口中 VirtualServiceOuterClass.HTTPRetryOrBuilderpublic boolean hasPerTryTimeout()
Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is same value as request `timeout` of the [HTTP route](https://istio.io/docs/reference/config/networking/virtual-service/#HTTPRoute), which means no timeout.
.google.protobuf.Duration per_try_timeout = 2;hasPerTryTimeout 在接口中 VirtualServiceOuterClass.HTTPRetryOrBuilderpublic com.google.protobuf.Duration getPerTryTimeout()
Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is same value as request `timeout` of the [HTTP route](https://istio.io/docs/reference/config/networking/virtual-service/#HTTPRoute), which means no timeout.
.google.protobuf.Duration per_try_timeout = 2;getPerTryTimeout 在接口中 VirtualServiceOuterClass.HTTPRetryOrBuilderpublic com.google.protobuf.DurationOrBuilder getPerTryTimeoutOrBuilder()
Timeout per retry attempt for a given request. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is same value as request `timeout` of the [HTTP route](https://istio.io/docs/reference/config/networking/virtual-service/#HTTPRoute), which means no timeout.
.google.protobuf.Duration per_try_timeout = 2;public String getRetryOn()
Specifies the conditions under which retry takes place. One or more policies can be specified using a ‘,’ delimited list. See the [retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on) and [gRPC retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on) for more details.
string retry_on = 3;getRetryOn 在接口中 VirtualServiceOuterClass.HTTPRetryOrBuilderpublic com.google.protobuf.ByteString getRetryOnBytes()
Specifies the conditions under which retry takes place. One or more policies can be specified using a ‘,’ delimited list. See the [retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-on) and [gRPC retry policies](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#x-envoy-retry-grpc-on) for more details.
string retry_on = 3;getRetryOnBytes 在接口中 VirtualServiceOuterClass.HTTPRetryOrBuilderpublic boolean hasRetryRemoteLocalities()
Flag to specify whether the retries should retry to other localities. See the [retry plugin configuration](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_connection_management#retry-plugin-configuration) for more details.
.google.protobuf.BoolValue retry_remote_localities = 4;hasRetryRemoteLocalities 在接口中 VirtualServiceOuterClass.HTTPRetryOrBuilderpublic com.google.protobuf.BoolValue getRetryRemoteLocalities()
Flag to specify whether the retries should retry to other localities. See the [retry plugin configuration](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_connection_management#retry-plugin-configuration) for more details.
.google.protobuf.BoolValue retry_remote_localities = 4;getRetryRemoteLocalities 在接口中 VirtualServiceOuterClass.HTTPRetryOrBuilderpublic com.google.protobuf.BoolValueOrBuilder getRetryRemoteLocalitiesOrBuilder()
Flag to specify whether the retries should retry to other localities. See the [retry plugin configuration](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_connection_management#retry-plugin-configuration) for more details.
.google.protobuf.BoolValue retry_remote_localities = 4;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.HTTPRetry parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(InputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPRetry parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic VirtualServiceOuterClass.HTTPRetry.Builder newBuilderForType()
newBuilderForType 在接口中 com.google.protobuf.MessagenewBuilderForType 在接口中 com.google.protobuf.MessageLitepublic static VirtualServiceOuterClass.HTTPRetry.Builder newBuilder()
public static VirtualServiceOuterClass.HTTPRetry.Builder newBuilder(VirtualServiceOuterClass.HTTPRetry prototype)
public VirtualServiceOuterClass.HTTPRetry.Builder toBuilder()
toBuilder 在接口中 com.google.protobuf.MessagetoBuilder 在接口中 com.google.protobuf.MessageLiteprotected VirtualServiceOuterClass.HTTPRetry.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3public static VirtualServiceOuterClass.HTTPRetry getDefaultInstance()
public static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRetry> parser()
public com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPRetry> getParserForType()
getParserForType 在接口中 com.google.protobuf.MessagegetParserForType 在接口中 com.google.protobuf.MessageLitegetParserForType 在类中 com.google.protobuf.GeneratedMessageV3public VirtualServiceOuterClass.HTTPRetry getDefaultInstanceForType()
getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilderCopyright © 2018–2023 Alibaba Group. All rights reserved.