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. Currently, only HTTP filter (envoy.filters.http.dynamic_modules) is supported.

 How a module is loaded is determined by the extension point that uses it. For example, the HTTP filter
 loads the module with dlopen when Envoy receives a configuration that references the module at load time.
 If loading the module fails, the configuration will be rejected.

 Whether or not the shared object is the same is determined by the file path as well as 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, we will revisit
 this restriction and hopefully provide a wider compatibility guarantee. 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``. TODO: 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``. TODO: 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``. TODO: 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``. TODO: 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``. TODO: 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()
       Set true to prevent 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).
       
      bool do_not_close = 3;
      Specified by:
      getDoNotClose in interface DynamicModuleConfigOrBuilder
      Returns:
      The doNotClose.
    • setDoNotClose

      public DynamicModuleConfig.Builder setDoNotClose(boolean value)
       Set true to prevent 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).
       
      bool do_not_close = 3;
      Parameters:
      value - The doNotClose to set.
      Returns:
      This builder for chaining.
    • clearDoNotClose

      public DynamicModuleConfig.Builder clearDoNotClose()
       Set true to prevent 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).
       
      bool do_not_close = 3;
      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>