Interface LuaOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Lua,Lua.Builder
public interface LuaOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleanMap of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`.com.google.protobuf.BoolValueIf set to true, the Lua filter will clear the route cache automatically if the request headers are modified by the Lua script.com.google.protobuf.BoolValueOrBuilderIf set to true, the Lua filter will clear the route cache automatically if the request headers are modified by the Lua script.The default Lua code that Envoy will execute.The default Lua code that Envoy will execute.Deprecated.envoy.extensions.filters.http.lua.v3.Lua.inline_code is deprecated.com.google.protobuf.ByteStringDeprecated.envoy.extensions.filters.http.lua.v3.Lua.inline_code is deprecated.Deprecated.intMap of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`.Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`.getSourceCodesOrDefault(String key, DataSource defaultValue) Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`.Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`.Optional additional prefix to use when emitting statistics.com.google.protobuf.ByteStringOptional additional prefix to use when emitting statistics.booleanIf set to true, the Lua filter will clear the route cache automatically if the request headers are modified by the Lua script.booleanThe default Lua code that Envoy will execute.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getInlineCode
Deprecated.envoy.extensions.filters.http.lua.v3.Lua.inline_code is deprecated. See envoy/extensions/filters/http/lua/v3/lua.proto;l=39The Lua code that Envoy will execute. This can be a very small script that further loads code from disk if desired. Note that if JSON configuration is used, the code must be properly escaped. YAML configuration may be easier to read since YAML supports multi-line strings so complex scripts can be easily expressed inline in the configuration. This field is deprecated. Please use :ref:`default_source_code <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.default_source_code>`. Only one of :ref:`inline_code <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.inline_code>` or :ref:`default_source_code <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.default_source_code>` can be set for the Lua filter.
string inline_code = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Returns:
- The inlineCode.
-
getInlineCodeBytes
Deprecated.envoy.extensions.filters.http.lua.v3.Lua.inline_code is deprecated. See envoy/extensions/filters/http/lua/v3/lua.proto;l=39The Lua code that Envoy will execute. This can be a very small script that further loads code from disk if desired. Note that if JSON configuration is used, the code must be properly escaped. YAML configuration may be easier to read since YAML supports multi-line strings so complex scripts can be easily expressed inline in the configuration. This field is deprecated. Please use :ref:`default_source_code <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.default_source_code>`. Only one of :ref:`inline_code <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.inline_code>` or :ref:`default_source_code <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.default_source_code>` can be set for the Lua filter.
string inline_code = 1 [deprecated = true, (.envoy.annotations.deprecated_at_minor_version) = "3.0"];- Returns:
- The bytes for inlineCode.
-
getSourceCodesCount
int getSourceCodesCount()Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`. The Lua source codes can be loaded from inline string or local files. Example: .. code-block:: yaml source_codes: hello.lua: inline_string: | function envoy_on_response(response_handle) -- Do something. end world.lua: filename: /etc/lua/world.luamap<string, .envoy.config.core.v3.DataSource> source_codes = 2; -
containsSourceCodes
Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`. The Lua source codes can be loaded from inline string or local files. Example: .. code-block:: yaml source_codes: hello.lua: inline_string: | function envoy_on_response(response_handle) -- Do something. end world.lua: filename: /etc/lua/world.luamap<string, .envoy.config.core.v3.DataSource> source_codes = 2; -
getSourceCodes
Deprecated.UsegetSourceCodesMap()instead. -
getSourceCodesMap
Map<String,DataSource> getSourceCodesMap()Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`. The Lua source codes can be loaded from inline string or local files. Example: .. code-block:: yaml source_codes: hello.lua: inline_string: | function envoy_on_response(response_handle) -- Do something. end world.lua: filename: /etc/lua/world.luamap<string, .envoy.config.core.v3.DataSource> source_codes = 2; -
getSourceCodesOrDefault
Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`. The Lua source codes can be loaded from inline string or local files. Example: .. code-block:: yaml source_codes: hello.lua: inline_string: | function envoy_on_response(response_handle) -- Do something. end world.lua: filename: /etc/lua/world.luamap<string, .envoy.config.core.v3.DataSource> source_codes = 2; -
getSourceCodesOrThrow
Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute <envoy_v3_api_msg_extensions.filters.http.lua.v3.LuaPerRoute>`. The Lua source codes can be loaded from inline string or local files. Example: .. code-block:: yaml source_codes: hello.lua: inline_string: | function envoy_on_response(response_handle) -- Do something. end world.lua: filename: /etc/lua/world.luamap<string, .envoy.config.core.v3.DataSource> source_codes = 2; -
hasDefaultSourceCode
boolean hasDefaultSourceCode()The default Lua code that Envoy will execute. If no per route config is provided for the request, this Lua code will be applied.
.envoy.config.core.v3.DataSource default_source_code = 3;- Returns:
- Whether the defaultSourceCode field is set.
-
getDefaultSourceCode
DataSource getDefaultSourceCode()The default Lua code that Envoy will execute. If no per route config is provided for the request, this Lua code will be applied.
.envoy.config.core.v3.DataSource default_source_code = 3;- Returns:
- The defaultSourceCode.
-
getDefaultSourceCodeOrBuilder
DataSourceOrBuilder getDefaultSourceCodeOrBuilder()The default Lua code that Envoy will execute. If no per route config is provided for the request, this Lua code will be applied.
.envoy.config.core.v3.DataSource default_source_code = 3; -
getStatPrefix
String getStatPrefix()Optional additional prefix to use when emitting statistics. By default metrics are emitted in *.lua.* namespace. If multiple lua filters are configured in a filter chain, the stats from each filter instance can be emitted using custom stat prefix to distinguish emitted statistics. For example: .. code-block:: yaml http_filters: - name: envoy.filters.http.lua typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua stat_prefix: foo_script # This emits lua.foo_script.errors etc. - name: envoy.filters.http.lua typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua stat_prefix: bar_script # This emits lua.bar_script.errors etc.string stat_prefix = 4;- Returns:
- The statPrefix.
-
getStatPrefixBytes
com.google.protobuf.ByteString getStatPrefixBytes()Optional additional prefix to use when emitting statistics. By default metrics are emitted in *.lua.* namespace. If multiple lua filters are configured in a filter chain, the stats from each filter instance can be emitted using custom stat prefix to distinguish emitted statistics. For example: .. code-block:: yaml http_filters: - name: envoy.filters.http.lua typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua stat_prefix: foo_script # This emits lua.foo_script.errors etc. - name: envoy.filters.http.lua typed_config: "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua stat_prefix: bar_script # This emits lua.bar_script.errors etc.string stat_prefix = 4;- Returns:
- The bytes for statPrefix.
-
hasClearRouteCache
boolean hasClearRouteCache()If set to true, the Lua filter will clear the route cache automatically if the request headers are modified by the Lua script. If set to false, the Lua filter will not clear the route cache automatically. Default is true for backward compatibility.
.google.protobuf.BoolValue clear_route_cache = 5;- Returns:
- Whether the clearRouteCache field is set.
-
getClearRouteCache
com.google.protobuf.BoolValue getClearRouteCache()If set to true, the Lua filter will clear the route cache automatically if the request headers are modified by the Lua script. If set to false, the Lua filter will not clear the route cache automatically. Default is true for backward compatibility.
.google.protobuf.BoolValue clear_route_cache = 5;- Returns:
- The clearRouteCache.
-
getClearRouteCacheOrBuilder
com.google.protobuf.BoolValueOrBuilder getClearRouteCacheOrBuilder()If set to true, the Lua filter will clear the route cache automatically if the request headers are modified by the Lua script. If set to false, the Lua filter will not clear the route cache automatically. Default is true for backward compatibility.
.google.protobuf.BoolValue clear_route_cache = 5;
-