Documentation
¶
Index ¶
- Variables
- type DynamicModuleConfig
- func (*DynamicModuleConfig) Descriptor() ([]byte, []int)deprecated
- func (x *DynamicModuleConfig) GetDoNotClose() bool
- func (x *DynamicModuleConfig) GetLoadGlobally() bool
- func (x *DynamicModuleConfig) GetName() string
- func (*DynamicModuleConfig) ProtoMessage()
- func (x *DynamicModuleConfig) ProtoReflect() protoreflect.Message
- func (x *DynamicModuleConfig) Reset()
- func (x *DynamicModuleConfig) String() string
- func (m *DynamicModuleConfig) Validate() error
- func (m *DynamicModuleConfig) ValidateAll() error
- type DynamicModuleConfigMultiError
- type DynamicModuleConfigValidationError
- func (e DynamicModuleConfigValidationError) Cause() error
- func (e DynamicModuleConfigValidationError) Error() string
- func (e DynamicModuleConfigValidationError) ErrorName() string
- func (e DynamicModuleConfigValidationError) Field() string
- func (e DynamicModuleConfigValidationError) Key() bool
- func (e DynamicModuleConfigValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_dynamic_modules_v3_dynamic_modules_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DynamicModuleConfig ¶
type DynamicModuleConfig struct {
// The name of the dynamic module.
//
// The client is expected to have some configuration indicating where to search for the module. In
// Envoy, the search path can only be configured via the environment variable
// “ENVOY_DYNAMIC_MODULES_SEARCH_PATH“. The actual search path is
// “${ENVOY_DYNAMIC_MODULES_SEARCH_PATH}/lib${name}.so“.
//
// .. note::
//
// There is some remaining work to make the search path configurable via command line options.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// If true, prevents the module from being unloaded with “dlclose“.
//
// This is useful for modules that have global state that should not be unloaded. A module is
// closed when no more references to it exist in the process. For example, no HTTP filters are
// using the module (e.g. after configuration update).
//
// Defaults to “false“.
DoNotClose bool `protobuf:"varint,3,opt,name=do_not_close,json=doNotClose,proto3" json:"do_not_close,omitempty"`
// If true, the dynamic module is loaded with the “RTLD_GLOBAL“ flag.
//
// The dynamic module is loaded with the “RTLD_LOCAL“ flag by default to avoid symbol conflicts
// when multiple modules are loaded. Set this to “true“ to load the module with the
// “RTLD_GLOBAL“ flag. This is useful for modules that need to share symbols with other dynamic
// libraries. For example, a module X may load another shared library Y that depends on some
// symbols defined in module X. In this case, module X must be loaded with the “RTLD_GLOBAL“
// flag so that the symbols defined in module X are visible to library Y.
//
// .. warning::
//
// Use this option with caution as it may lead to symbol conflicts and undefined behavior if
// multiple modules define the same symbols and are loaded globally.
//
// Defaults to “false“.
LoadGlobally bool `protobuf:"varint,4,opt,name=load_globally,json=loadGlobally,proto3" json:"load_globally,omitempty"`
// contains filtered or unexported fields
}
Configuration of a dynamic module. A dynamic module is a shared object file that can be loaded via “dlopen“ by various Envoy extension points.
How a module is loaded is determined by the extension point that uses it. For example, the HTTP filter loads the module when Envoy receives a configuration that references the module. If loading the module fails, the configuration will be rejected.
A module is uniquely identified by its file path and the file's inode, depending on the platform. Notably, if the file path and the content of the file are the same, the shared object will be reused.
A module must be compatible with the ABI specified in :repo:`abi.h <source/extensions/dynamic_modules/abi.h>`. Currently, compatibility is only guaranteed by an exact version match between the Envoy codebase and the dynamic module SDKs. In the future, after the ABI is stabilized, this restriction will be revisited. Until then, Envoy checks the hash of the ABI header files to ensure that the dynamic modules are built against the same version of the ABI.
func (*DynamicModuleConfig) Descriptor
deprecated
func (*DynamicModuleConfig) Descriptor() ([]byte, []int)
Deprecated: Use DynamicModuleConfig.ProtoReflect.Descriptor instead.
func (*DynamicModuleConfig) GetDoNotClose ¶
func (x *DynamicModuleConfig) GetDoNotClose() bool
func (*DynamicModuleConfig) GetLoadGlobally ¶ added in v1.37.0
func (x *DynamicModuleConfig) GetLoadGlobally() bool
func (*DynamicModuleConfig) GetName ¶
func (x *DynamicModuleConfig) GetName() string
func (*DynamicModuleConfig) ProtoMessage ¶
func (*DynamicModuleConfig) ProtoMessage()
func (*DynamicModuleConfig) ProtoReflect ¶
func (x *DynamicModuleConfig) ProtoReflect() protoreflect.Message
func (*DynamicModuleConfig) Reset ¶
func (x *DynamicModuleConfig) Reset()
func (*DynamicModuleConfig) String ¶
func (x *DynamicModuleConfig) String() string
func (*DynamicModuleConfig) Validate ¶
func (m *DynamicModuleConfig) Validate() error
Validate checks the field values on DynamicModuleConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*DynamicModuleConfig) ValidateAll ¶
func (m *DynamicModuleConfig) ValidateAll() error
ValidateAll checks the field values on DynamicModuleConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DynamicModuleConfigMultiError, or nil if none found.
type DynamicModuleConfigMultiError ¶
type DynamicModuleConfigMultiError []error
DynamicModuleConfigMultiError is an error wrapping multiple validation errors returned by DynamicModuleConfig.ValidateAll() if the designated constraints aren't met.
func (DynamicModuleConfigMultiError) AllErrors ¶
func (m DynamicModuleConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DynamicModuleConfigMultiError) Error ¶
func (m DynamicModuleConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DynamicModuleConfigValidationError ¶
type DynamicModuleConfigValidationError struct {
// contains filtered or unexported fields
}
DynamicModuleConfigValidationError is the validation error returned by DynamicModuleConfig.Validate if the designated constraints aren't met.
func (DynamicModuleConfigValidationError) Cause ¶
func (e DynamicModuleConfigValidationError) Cause() error
Cause function returns cause value.
func (DynamicModuleConfigValidationError) Error ¶
func (e DynamicModuleConfigValidationError) Error() string
Error satisfies the builtin error interface
func (DynamicModuleConfigValidationError) ErrorName ¶
func (e DynamicModuleConfigValidationError) ErrorName() string
ErrorName returns error name.
func (DynamicModuleConfigValidationError) Field ¶
func (e DynamicModuleConfigValidationError) Field() string
Field function returns field value.
func (DynamicModuleConfigValidationError) Key ¶
func (e DynamicModuleConfigValidationError) Key() bool
Key function returns key value.
func (DynamicModuleConfigValidationError) Reason ¶
func (e DynamicModuleConfigValidationError) Reason() string
Reason function returns reason value.