public interface LocalReplyConfigOrBuilder
extends com.google.protobuf.MessageOrBuilder
| Modifier and Type | Method and Description |
|---|---|
SubstitutionFormatString |
getBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
SubstitutionFormatStringOrBuilder |
getBodyFormatOrBuilder()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
ResponseMapper |
getMappers(int index)
Configuration of list of mappers which allows to filter and change local response.
|
int |
getMappersCount()
Configuration of list of mappers which allows to filter and change local response.
|
List<ResponseMapper> |
getMappersList()
Configuration of list of mappers which allows to filter and change local response.
|
ResponseMapperOrBuilder |
getMappersOrBuilder(int index)
Configuration of list of mappers which allows to filter and change local response.
|
List<? extends ResponseMapperOrBuilder> |
getMappersOrBuilderList()
Configuration of list of mappers which allows to filter and change local response.
|
boolean |
hasBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
|
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofList<ResponseMapper> getMappersList()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;ResponseMapper getMappers(int index)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;int getMappersCount()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;List<? extends ResponseMapperOrBuilder> getMappersOrBuilderList()
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;ResponseMapperOrBuilder getMappersOrBuilder(int index)
Configuration of list of mappers which allows to filter and change local response. The mappers will be checked by the specified order until one is matched.
repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;boolean hasBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v3.SubstitutionFormatString body_format = 2;SubstitutionFormatString getBodyFormat()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v3.SubstitutionFormatString body_format = 2;SubstitutionFormatStringOrBuilder getBodyFormatOrBuilder()
The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
and to specify response content type as one of: plain/text or application/json.
Example one: "plain/text" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
The following response body in "plain/text" format will be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: text
upstream connect error:503:path=/foo
Example two: "application/json" ``body_format``.
.. validated-code-block:: yaml
:type-name: envoy.config.core.v3.SubstitutionFormatString
json_format:
status: "%RESPONSE_CODE%"
message: "%LOCAL_REPLY_BODY%"
path: "%REQ(:path)%"
The following response body in "application/json" format would be generated for a request with
local reply body of "upstream connection error", response_code=503 and path=/foo.
.. code-block:: json
{
"status": 503,
"message": "upstream connection error",
"path": "/foo"
}
.envoy.config.core.v3.SubstitutionFormatString body_format = 2;Copyright © 2018–2021 The Envoy Project. All rights reserved.