Documentation
¶
Index ¶
- Constants
- Variables
- type Lua
- func (x *Lua) ClearClearRouteCache()
- func (x *Lua) ClearDefaultSourceCode()
- func (x *Lua) GetClearRouteCache() *wrapperspb.BoolValue
- func (x *Lua) GetDefaultSourceCode() *v3.DataSource
- func (x *Lua) GetInlineCode() stringdeprecated
- func (x *Lua) GetSourceCodes() map[string]*v3.DataSource
- func (x *Lua) GetStatPrefix() string
- func (x *Lua) HasClearRouteCache() bool
- func (x *Lua) HasDefaultSourceCode() bool
- func (*Lua) ProtoMessage()
- func (x *Lua) ProtoReflect() protoreflect.Message
- func (x *Lua) Reset()
- func (x *Lua) SetClearRouteCache(v *wrapperspb.BoolValue)
- func (x *Lua) SetDefaultSourceCode(v *v3.DataSource)
- func (x *Lua) SetInlineCode(v string)deprecated
- func (x *Lua) SetSourceCodes(v map[string]*v3.DataSource)
- func (x *Lua) SetStatPrefix(v string)
- func (x *Lua) String() string
- type LuaPerRoute
- func (x *LuaPerRoute) ClearDisabled()
- func (x *LuaPerRoute) ClearFilterContext()
- func (x *LuaPerRoute) ClearName()
- func (x *LuaPerRoute) ClearOverride()
- func (x *LuaPerRoute) ClearSourceCode()
- func (x *LuaPerRoute) GetDisabled() bool
- func (x *LuaPerRoute) GetFilterContext() *structpb.Struct
- func (x *LuaPerRoute) GetName() string
- func (x *LuaPerRoute) GetOverride() isLuaPerRoute_Override
- func (x *LuaPerRoute) GetSourceCode() *v3.DataSource
- func (x *LuaPerRoute) HasDisabled() bool
- func (x *LuaPerRoute) HasFilterContext() bool
- func (x *LuaPerRoute) HasName() bool
- func (x *LuaPerRoute) HasOverride() bool
- func (x *LuaPerRoute) HasSourceCode() bool
- func (*LuaPerRoute) ProtoMessage()
- func (x *LuaPerRoute) ProtoReflect() protoreflect.Message
- func (x *LuaPerRoute) Reset()
- func (x *LuaPerRoute) SetDisabled(v bool)
- func (x *LuaPerRoute) SetFilterContext(v *structpb.Struct)
- func (x *LuaPerRoute) SetName(v string)
- func (x *LuaPerRoute) SetSourceCode(v *v3.DataSource)
- func (x *LuaPerRoute) String() string
- func (x *LuaPerRoute) WhichOverride() case_LuaPerRoute_Override
- type LuaPerRoute_Disabled
- type LuaPerRoute_Name
- type LuaPerRoute_SourceCode
- type LuaPerRoute_builder
- type Lua_builder
Constants ¶
View Source
const LuaPerRoute_Disabled_case case_LuaPerRoute_Override = 1
View Source
const LuaPerRoute_Name_case case_LuaPerRoute_Override = 2
View Source
const LuaPerRoute_Override_not_set_case case_LuaPerRoute_Override = 0
View Source
const LuaPerRoute_SourceCode_case case_LuaPerRoute_Override = 3
Variables ¶
View Source
var File_envoy_extensions_filters_http_lua_v3_lua_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Lua ¶
type Lua struct {
// The 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.
//
// Deprecated: Marked as deprecated in envoy/extensions/filters/http/lua/v3/lua.proto.
InlineCode string `protobuf:"bytes,1,opt,name=inline_code,json=inlineCode,proto3" json:"inline_code,omitempty"`
// 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.lua
SourceCodes map[string]*v3.DataSource `` /* 168-byte string literal not displayed */
// The default Lua code that Envoy will execute. If no per route config is provided
// for the request, this Lua code will be applied.
DefaultSourceCode *v3.DataSource `protobuf:"bytes,3,opt,name=default_source_code,json=defaultSourceCode,proto3" json:"default_source_code,omitempty"`
// 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.
StatPrefix string `protobuf:"bytes,4,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
// 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.
ClearRouteCache *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=clear_route_cache,json=clearRouteCache,proto3" json:"clear_route_cache,omitempty"`
// contains filtered or unexported fields
}
[#next-free-field: 6]
func (*Lua) GetClearRouteCache ¶
func (x *Lua) GetClearRouteCache() *wrapperspb.BoolValue
func (*Lua) GetDefaultSourceCode ¶
func (x *Lua) GetDefaultSourceCode() *v3.DataSource
func (*Lua) GetSourceCodes ¶
func (x *Lua) GetSourceCodes() map[string]*v3.DataSource
func (*Lua) ProtoReflect ¶
func (x *Lua) ProtoReflect() protoreflect.Message
func (*Lua) SetClearRouteCache ¶
func (x *Lua) SetClearRouteCache(v *wrapperspb.BoolValue)
func (*Lua) SetDefaultSourceCode ¶
func (x *Lua) SetDefaultSourceCode(v *v3.DataSource)
func (*Lua) SetSourceCodes ¶
func (x *Lua) SetSourceCodes(v map[string]*v3.DataSource)
type LuaPerRoute ¶
type LuaPerRoute struct {
// Types that are valid to be assigned to Override:
//
// *LuaPerRoute_Disabled
// *LuaPerRoute_Name
// *LuaPerRoute_SourceCode
Override isLuaPerRoute_Override `protobuf_oneof:"override"`
// Optional filter context for Lua script. This could be used to pass configuration
// to Lua script. The Lua script can access the filter context using “handle:filterContext()“.
// For example:
//
// .. code-block:: lua
//
// function envoy_on_request(request_handle)
// local filter_context = request_handle:filterContext()
// local filter_context_value = filter_context["key"]
// -- Do something with filter_context_value.
// end
FilterContext *structpb.Struct `protobuf:"bytes,4,opt,name=filter_context,json=filterContext,proto3" json:"filter_context,omitempty"`
// contains filtered or unexported fields
}
func (*LuaPerRoute) ClearDisabled ¶
func (x *LuaPerRoute) ClearDisabled()
func (*LuaPerRoute) ClearFilterContext ¶
func (x *LuaPerRoute) ClearFilterContext()
func (*LuaPerRoute) ClearName ¶
func (x *LuaPerRoute) ClearName()
func (*LuaPerRoute) ClearOverride ¶
func (x *LuaPerRoute) ClearOverride()
func (*LuaPerRoute) ClearSourceCode ¶
func (x *LuaPerRoute) ClearSourceCode()
func (*LuaPerRoute) GetDisabled ¶
func (x *LuaPerRoute) GetDisabled() bool
func (*LuaPerRoute) GetFilterContext ¶
func (x *LuaPerRoute) GetFilterContext() *structpb.Struct
func (*LuaPerRoute) GetName ¶
func (x *LuaPerRoute) GetName() string
func (*LuaPerRoute) GetOverride ¶
func (x *LuaPerRoute) GetOverride() isLuaPerRoute_Override
func (*LuaPerRoute) GetSourceCode ¶
func (x *LuaPerRoute) GetSourceCode() *v3.DataSource
func (*LuaPerRoute) HasDisabled ¶
func (x *LuaPerRoute) HasDisabled() bool
func (*LuaPerRoute) HasFilterContext ¶
func (x *LuaPerRoute) HasFilterContext() bool
func (*LuaPerRoute) HasName ¶
func (x *LuaPerRoute) HasName() bool
func (*LuaPerRoute) HasOverride ¶
func (x *LuaPerRoute) HasOverride() bool
func (*LuaPerRoute) HasSourceCode ¶
func (x *LuaPerRoute) HasSourceCode() bool
func (*LuaPerRoute) ProtoMessage ¶
func (*LuaPerRoute) ProtoMessage()
func (*LuaPerRoute) ProtoReflect ¶
func (x *LuaPerRoute) ProtoReflect() protoreflect.Message
func (*LuaPerRoute) Reset ¶
func (x *LuaPerRoute) Reset()
func (*LuaPerRoute) SetDisabled ¶
func (x *LuaPerRoute) SetDisabled(v bool)
func (*LuaPerRoute) SetFilterContext ¶
func (x *LuaPerRoute) SetFilterContext(v *structpb.Struct)
func (*LuaPerRoute) SetName ¶
func (x *LuaPerRoute) SetName(v string)
func (*LuaPerRoute) SetSourceCode ¶
func (x *LuaPerRoute) SetSourceCode(v *v3.DataSource)
func (*LuaPerRoute) String ¶
func (x *LuaPerRoute) String() string
func (*LuaPerRoute) WhichOverride ¶
func (x *LuaPerRoute) WhichOverride() case_LuaPerRoute_Override
type LuaPerRoute_Disabled ¶
type LuaPerRoute_Disabled struct {
// Disable the Lua filter for this particular vhost or route. If disabled is specified in
// multiple per-filter-configs, the most specific one will be used.
Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"`
}
type LuaPerRoute_Name ¶
type LuaPerRoute_Name struct {
// A name of a Lua source code stored in
// :ref:`Lua.source_codes <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.source_codes>`.
Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"`
}
type LuaPerRoute_SourceCode ¶
type LuaPerRoute_SourceCode struct {
// A configured per-route Lua source code that can be served by RDS or provided inline.
SourceCode *v3.DataSource `protobuf:"bytes,3,opt,name=source_code,json=sourceCode,proto3,oneof"`
}
type LuaPerRoute_builder ¶
type LuaPerRoute_builder struct {
// Fields of oneof Override:
// Disable the Lua filter for this particular vhost or route. If disabled is specified in
// multiple per-filter-configs, the most specific one will be used.
Disabled *bool
// A name of a Lua source code stored in
// :ref:`Lua.source_codes <envoy_v3_api_field_extensions.filters.http.lua.v3.Lua.source_codes>`.
Name *string
// A configured per-route Lua source code that can be served by RDS or provided inline.
SourceCode *v3.DataSource
// -- end of Override
// Optional filter context for Lua script. This could be used to pass configuration
// to Lua script. The Lua script can access the filter context using “handle:filterContext()“.
// For example:
//
// .. code-block:: lua
//
// function envoy_on_request(request_handle)
// local filter_context = request_handle:filterContext()
// local filter_context_value = filter_context["key"]
// -- Do something with filter_context_value.
// end
FilterContext *structpb.Struct
// contains filtered or unexported fields
}
func (LuaPerRoute_builder) Build ¶
func (b0 LuaPerRoute_builder) Build() *LuaPerRoute
type Lua_builder ¶
type Lua_builder struct {
// The 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.
//
// Deprecated: Marked as deprecated in envoy/extensions/filters/http/lua/v3/lua.proto.
InlineCode string
// 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.lua
SourceCodes map[string]*v3.DataSource
// The default Lua code that Envoy will execute. If no per route config is provided
// for the request, this Lua code will be applied.
DefaultSourceCode *v3.DataSource
// 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.
StatPrefix string
// 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.
ClearRouteCache *wrapperspb.BoolValue
// contains filtered or unexported fields
}
func (Lua_builder) Build ¶
func (b0 Lua_builder) Build() *Lua
Source Files
¶
- lua.pb.go
Click to show internal directories.
Click to hide internal directories.