Class DynamicModuleConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
io.envoyproxy.envoy.extensions.dynamic_modules.v3.DynamicModuleConfig.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,DynamicModuleConfigOrBuilder,Cloneable
- Enclosing class:
- DynamicModuleConfig
public static final class DynamicModuleConfig.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
implements DynamicModuleConfigOrBuilder
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.Protobuf type
envoy.extensions.dynamic_modules.v3.DynamicModuleConfig-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()If true, prevents the module from being unloaded with ``dlclose``.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) If true, the dynamic module is loaded with the ``RTLD_GLOBAL`` flag.The name of the dynamic module.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanIf true, prevents the module from being unloaded with ``dlclose``.booleanIf true, the dynamic module is loaded with the ``RTLD_GLOBAL`` flag.getName()The name of the dynamic module.com.google.protobuf.ByteStringThe name of the dynamic module.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(DynamicModuleConfig other) mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setDoNotClose(boolean value) If true, prevents the module from being unloaded with ``dlclose``.setLoadGlobally(boolean value) If true, the dynamic module is loaded with the ``RTLD_GLOBAL`` flag.The name of the dynamic module.setNameBytes(com.google.protobuf.ByteString value) The name of the dynamic module.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
setField
public DynamicModuleConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
clearField
public DynamicModuleConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
clearOneof
public DynamicModuleConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
setRepeatedField
public DynamicModuleConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
addRepeatedField
public DynamicModuleConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DynamicModuleConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
mergeFrom
public DynamicModuleConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<DynamicModuleConfig.Builder>- Throws:
IOException
-
getName
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.string name = 1 [(.validate.rules) = { ... }- Specified by:
getNamein interfaceDynamicModuleConfigOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()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.string name = 1 [(.validate.rules) = { ... }- Specified by:
getNameBytesin interfaceDynamicModuleConfigOrBuilder- Returns:
- The bytes for name.
-
setName
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.string name = 1 [(.validate.rules) = { ... }- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
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.string name = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setNameBytes
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.string name = 1 [(.validate.rules) = { ... }- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDoNotClose
public boolean getDoNotClose()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``.
bool do_not_close = 3;- Specified by:
getDoNotClosein interfaceDynamicModuleConfigOrBuilder- Returns:
- The doNotClose.
-
setDoNotClose
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``.
bool do_not_close = 3;- Parameters:
value- The doNotClose to set.- Returns:
- This builder for chaining.
-
clearDoNotClose
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``.
bool do_not_close = 3;- Returns:
- This builder for chaining.
-
getLoadGlobally
public boolean getLoadGlobally()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``.
bool load_globally = 4;- Specified by:
getLoadGloballyin interfaceDynamicModuleConfigOrBuilder- Returns:
- The loadGlobally.
-
setLoadGlobally
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``.
bool load_globally = 4;- Parameters:
value- The loadGlobally to set.- Returns:
- This builder for chaining.
-
clearLoadGlobally
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``.
bool load_globally = 4;- Returns:
- This builder for chaining.
-
setUnknownFields
public final DynamicModuleConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-
mergeUnknownFields
public final DynamicModuleConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
-