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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • getDefaultInstanceForType

      public DynamicModuleConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public DynamicModuleConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public DynamicModuleConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • setField

      public DynamicModuleConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • clearField

      public DynamicModuleConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • clearOneof

      public DynamicModuleConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • setRepeatedField

      public DynamicModuleConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • addRepeatedField

      public DynamicModuleConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • mergeFrom

      public DynamicModuleConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DynamicModuleConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DynamicModuleConfig.Builder>
      Throws:
      IOException
    • getName

      public String 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:
      getName in interface DynamicModuleConfigOrBuilder
      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:
      getNameBytes in interface DynamicModuleConfigOrBuilder
      Returns:
      The bytes for name.
    • setName

      public DynamicModuleConfig.Builder setName(String value)
       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

      public DynamicModuleConfig.Builder 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

      public DynamicModuleConfig.Builder setNameBytes(com.google.protobuf.ByteString value)
       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:
      getDoNotClose in interface DynamicModuleConfigOrBuilder
      Returns:
      The doNotClose.
    • setDoNotClose

      public DynamicModuleConfig.Builder setDoNotClose(boolean value)
       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

      public DynamicModuleConfig.Builder 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:
      getLoadGlobally in interface DynamicModuleConfigOrBuilder
      Returns:
      The loadGlobally.
    • setLoadGlobally

      public DynamicModuleConfig.Builder setLoadGlobally(boolean value)
       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

      public DynamicModuleConfig.Builder 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:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>
    • mergeUnknownFields

      public final DynamicModuleConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DynamicModuleConfig.Builder>