类 VirtualServiceOuterClass.HTTPFaultInjection.Abort
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
istio.networking.v1alpha3.VirtualServiceOuterClass.HTTPFaultInjection.Abort
- 所有已实现的接口:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder,Serializable
public static final class VirtualServiceOuterClass.HTTPFaultInjection.Abort
extends com.google.protobuf.GeneratedMessageV3
implements VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder
Abort specification is used to prematurely abort a request with a
pre-specified error code. The following example will return an HTTP 400
error code for 1 out of every 1000 requests to the "ratings" service "v1".
{{<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
fault:
abort:
percentage:
value: 0.1
httpStatus: 400
```
{{</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
fault:
abort:
percentage:
value: 0.1
httpStatus: 400
```
{{</tab>}}
{{</tabset>}}
The _httpStatus_ field is used to indicate the HTTP status code to
return to the caller. The optional _percentage_ field can be used to only
abort a certain percentage of requests. If not specified, all requests are
aborted.
Protobuf type istio.networking.v1alpha3.HTTPFaultInjection.Abort- 另请参阅:
-
嵌套类概要
嵌套类修饰符和类型类说明static final classAbort specification is used to prematurely abort a request with a pre-specified error code.static enum从类继承的嵌套类/接口 com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter 从类继承的嵌套类/接口 com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
字段概要
字段修饰符和类型字段说明static final intstatic final intstatic final intstatic final int从类继承的字段 com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFields从类继承的字段 com.google.protobuf.AbstractMessage
memoizedSize从类继承的字段 com.google.protobuf.AbstractMessageLite
memoizedHashCode -
方法概要
修饰符和类型方法说明booleanstatic final com.google.protobuf.Descriptors.Descriptor$hide_from_docscom.google.protobuf.ByteString$hide_from_docs$hide_from_docscom.google.protobuf.ByteString$hide_from_docsintHTTP status code to use to abort the Http request.com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Abort> Percentage of requests to be aborted with the error code provided.Percentage of requests to be aborted with the error code provided.intboolean$hide_from_docsinthashCode()boolean$hide_from_docsbooleanHTTP status code to use to abort the Http request.booleanPercentage of requests to be aborted with the error code provided.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) parseDelimitedFrom(InputStream input) parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(byte[] data) parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.ByteString data) parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(com.google.protobuf.CodedInputStream input) parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(InputStream input) parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Abort> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) 从类继承的方法 com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, 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从类继承的方法 com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo从接口继承的方法 com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo从接口继承的方法 com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
字段详细资料
-
HTTP_STATUS_FIELD_NUMBER
public static final int HTTP_STATUS_FIELD_NUMBER- 另请参阅:
-
GRPC_STATUS_FIELD_NUMBER
public static final int GRPC_STATUS_FIELD_NUMBER- 另请参阅:
-
HTTP2_ERROR_FIELD_NUMBER
public static final int HTTP2_ERROR_FIELD_NUMBER- 另请参阅:
-
PERCENTAGE_FIELD_NUMBER
public static final int PERCENTAGE_FIELD_NUMBER- 另请参阅:
-
-
方法详细资料
-
newInstance
- 覆盖:
newInstance在类中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
-
getErrorTypeCase
-
hasHttpStatus
public boolean hasHttpStatus()HTTP status code to use to abort the Http request.
int32 http_status = 2 [(.google.api.field_behavior) = REQUIRED];- 指定者:
hasHttpStatus在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- Whether the httpStatus field is set.
-
getHttpStatus
public int getHttpStatus()HTTP status code to use to abort the Http request.
int32 http_status = 2 [(.google.api.field_behavior) = REQUIRED];- 指定者:
getHttpStatus在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- The httpStatus.
-
hasGrpcStatus
public boolean hasGrpcStatus()$hide_from_docs
string grpc_status = 3;- 指定者:
hasGrpcStatus在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- Whether the grpcStatus field is set.
-
getGrpcStatus
$hide_from_docs
string grpc_status = 3;- 指定者:
getGrpcStatus在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- The grpcStatus.
-
getGrpcStatusBytes
public com.google.protobuf.ByteString getGrpcStatusBytes()$hide_from_docs
string grpc_status = 3;- 指定者:
getGrpcStatusBytes在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- The bytes for grpcStatus.
-
hasHttp2Error
public boolean hasHttp2Error()$hide_from_docs
string http2_error = 4;- 指定者:
hasHttp2Error在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- Whether the http2Error field is set.
-
getHttp2Error
$hide_from_docs
string http2_error = 4;- 指定者:
getHttp2Error在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- The http2Error.
-
getHttp2ErrorBytes
public com.google.protobuf.ByteString getHttp2ErrorBytes()$hide_from_docs
string http2_error = 4;- 指定者:
getHttp2ErrorBytes在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- The bytes for http2Error.
-
hasPercentage
public boolean hasPercentage()Percentage of requests to be aborted with the error code provided.
.istio.networking.v1alpha3.Percent percentage = 5;- 指定者:
hasPercentage在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- Whether the percentage field is set.
-
getPercentage
Percentage of requests to be aborted with the error code provided.
.istio.networking.v1alpha3.Percent percentage = 5;- 指定者:
getPercentage在接口中VirtualServiceOuterClass.HTTPFaultInjection.AbortOrBuilder- 返回:
- The percentage.
-
getPercentageOrBuilder
Percentage of requests to be aborted with the error code provided.
.istio.networking.v1alpha3.Percent percentage = 5; -
isInitialized
public final boolean isInitialized()- 指定者:
isInitialized在接口中com.google.protobuf.MessageLiteOrBuilder- 覆盖:
isInitialized在类中com.google.protobuf.GeneratedMessageV3
-
writeTo
- 指定者:
writeTo在接口中com.google.protobuf.MessageLite- 覆盖:
writeTo在类中com.google.protobuf.GeneratedMessageV3- 抛出:
IOException
-
getSerializedSize
public int getSerializedSize()- 指定者:
getSerializedSize在接口中com.google.protobuf.MessageLite- 覆盖:
getSerializedSize在类中com.google.protobuf.GeneratedMessageV3
-
equals
- 指定者:
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.HTTPFaultInjection.Abort parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - 抛出:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(InputStream input) throws IOException - 抛出:
IOException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - 抛出:
IOException
-
parseDelimitedFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseDelimitedFrom(InputStream input) throws IOException - 抛出:
IOException
-
parseDelimitedFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - 抛出:
IOException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - 抛出:
IOException
-
parseFrom
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - 抛出:
IOException
-
newBuilderForType
- 指定者:
newBuilderForType在接口中com.google.protobuf.Message- 指定者:
newBuilderForType在接口中com.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
public static VirtualServiceOuterClass.HTTPFaultInjection.Abort.Builder newBuilder(VirtualServiceOuterClass.HTTPFaultInjection.Abort prototype) -
toBuilder
- 指定者:
toBuilder在接口中com.google.protobuf.Message- 指定者:
toBuilder在接口中com.google.protobuf.MessageLite
-
newBuilderForType
protected VirtualServiceOuterClass.HTTPFaultInjection.Abort.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - 指定者:
newBuilderForType在类中com.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
public static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Abort> parser() -
getParserForType
public com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPFaultInjection.Abort> getParserForType()- 指定者:
getParserForType在接口中com.google.protobuf.Message- 指定者:
getParserForType在接口中com.google.protobuf.MessageLite- 覆盖:
getParserForType在类中com.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageLiteOrBuilder- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageOrBuilder
-