java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DnsCacheConfigOrBuilder, Serializable

public final class DnsCacheConfig extends com.google.protobuf.GeneratedMessageV3 implements DnsCacheConfigOrBuilder
 Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview
 <arch_overview_http_dynamic_forward_proxy>` for more information.
 [#next-free-field: 7]
 
Protobuf type envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Configuration for the dynamic forward proxy DNS cache.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

    com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageV3

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    If the DNS failure refresh rate is specified, this is used as the cache's DNS refresh rate when DNS requests are failing.
    If the DNS failure refresh rate is specified, this is used as the cache's DNS refresh rate when DNS requests are failing.
    The DNS lookup family to use during resolution.
    int
    The DNS lookup family to use during resolution.
    com.google.protobuf.Duration
    The DNS refresh rate for currently cached DNS hosts.
    com.google.protobuf.DurationOrBuilder
    The DNS refresh rate for currently cached DNS hosts.
    com.google.protobuf.Duration
    The TTL for hosts that are unused.
    com.google.protobuf.DurationOrBuilder
    The TTL for hosts that are unused.
    com.google.protobuf.UInt32Value
    The maximum number of hosts that the cache will hold.
    com.google.protobuf.UInt32ValueOrBuilder
    The maximum number of hosts that the cache will hold.
    The name of the cache.
    com.google.protobuf.ByteString
    The name of the cache.
    com.google.protobuf.Parser<DnsCacheConfig>
     
    int
     
    boolean
    If the DNS failure refresh rate is specified, this is used as the cache's DNS refresh rate when DNS requests are failing.
    boolean
    The DNS refresh rate for currently cached DNS hosts.
    int
     
    boolean
    The TTL for hosts that are unused.
    boolean
    The maximum number of hosts that the cache will hold.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<DnsCacheConfig>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DNS_LOOKUP_FAMILY_FIELD_NUMBER

      public static final int DNS_LOOKUP_FAMILY_FIELD_NUMBER
      See Also:
    • DNS_REFRESH_RATE_FIELD_NUMBER

      public static final int DNS_REFRESH_RATE_FIELD_NUMBER
      See Also:
    • HOST_TTL_FIELD_NUMBER

      public static final int HOST_TTL_FIELD_NUMBER
      See Also:
    • MAX_HOSTS_FIELD_NUMBER

      public static final int MAX_HOSTS_FIELD_NUMBER
      See Also:
    • DNS_FAILURE_REFRESH_RATE_FIELD_NUMBER

      public static final int DNS_FAILURE_REFRESH_RATE_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • 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
    • getName

      public String getName()
       The name of the cache. Multiple named caches allow independent dynamic forward proxy
       configurations to operate within a single Envoy process using different configurations. All
       configurations with the same name *must* otherwise have the same settings when referenced
       from different configuration components. Configuration will fail to load if this is not
       the case.
       
      string name = 1 [(.validate.rules) = { ... }
      Specified by:
      getName in interface DnsCacheConfigOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the cache. Multiple named caches allow independent dynamic forward proxy
       configurations to operate within a single Envoy process using different configurations. All
       configurations with the same name *must* otherwise have the same settings when referenced
       from different configuration components. Configuration will fail to load if this is not
       the case.
       
      string name = 1 [(.validate.rules) = { ... }
      Specified by:
      getNameBytes in interface DnsCacheConfigOrBuilder
      Returns:
      The bytes for name.
    • getDnsLookupFamilyValue

      public int getDnsLookupFamilyValue()
       The DNS lookup family to use during resolution.
      
       [#comment:TODO(mattklein123): Figure out how to support IPv4/IPv6 "happy eyeballs" mode. The
       way this might work is a new lookup family which returns both IPv4 and IPv6 addresses, and
       then configures a host to have a primary and fall back address. With this, we could very
       likely build a "happy eyeballs" connection pool which would race the primary / fall back
       address and return the one that wins. This same method could potentially also be used for
       QUIC to TCP fall back.]
       
      .envoy.api.v2.Cluster.DnsLookupFamily dns_lookup_family = 2 [(.validate.rules) = { ... }
      Specified by:
      getDnsLookupFamilyValue in interface DnsCacheConfigOrBuilder
      Returns:
      The enum numeric value on the wire for dnsLookupFamily.
    • getDnsLookupFamily

      public Cluster.DnsLookupFamily getDnsLookupFamily()
       The DNS lookup family to use during resolution.
      
       [#comment:TODO(mattklein123): Figure out how to support IPv4/IPv6 "happy eyeballs" mode. The
       way this might work is a new lookup family which returns both IPv4 and IPv6 addresses, and
       then configures a host to have a primary and fall back address. With this, we could very
       likely build a "happy eyeballs" connection pool which would race the primary / fall back
       address and return the one that wins. This same method could potentially also be used for
       QUIC to TCP fall back.]
       
      .envoy.api.v2.Cluster.DnsLookupFamily dns_lookup_family = 2 [(.validate.rules) = { ... }
      Specified by:
      getDnsLookupFamily in interface DnsCacheConfigOrBuilder
      Returns:
      The dnsLookupFamily.
    • hasDnsRefreshRate

      public boolean hasDnsRefreshRate()
       The DNS refresh rate for currently cached DNS hosts. If not specified defaults to 60s.
      
       .. note:
      
        The returned DNS TTL is not currently used to alter the refresh rate. This feature will be
        added in a future change.
      
       .. note:
      
       The refresh rate is rounded to the closest millisecond, and must be at least 1ms.
       
      .google.protobuf.Duration dns_refresh_rate = 3 [(.validate.rules) = { ... }
      Specified by:
      hasDnsRefreshRate in interface DnsCacheConfigOrBuilder
      Returns:
      Whether the dnsRefreshRate field is set.
    • getDnsRefreshRate

      public com.google.protobuf.Duration getDnsRefreshRate()
       The DNS refresh rate for currently cached DNS hosts. If not specified defaults to 60s.
      
       .. note:
      
        The returned DNS TTL is not currently used to alter the refresh rate. This feature will be
        added in a future change.
      
       .. note:
      
       The refresh rate is rounded to the closest millisecond, and must be at least 1ms.
       
      .google.protobuf.Duration dns_refresh_rate = 3 [(.validate.rules) = { ... }
      Specified by:
      getDnsRefreshRate in interface DnsCacheConfigOrBuilder
      Returns:
      The dnsRefreshRate.
    • getDnsRefreshRateOrBuilder

      public com.google.protobuf.DurationOrBuilder getDnsRefreshRateOrBuilder()
       The DNS refresh rate for currently cached DNS hosts. If not specified defaults to 60s.
      
       .. note:
      
        The returned DNS TTL is not currently used to alter the refresh rate. This feature will be
        added in a future change.
      
       .. note:
      
       The refresh rate is rounded to the closest millisecond, and must be at least 1ms.
       
      .google.protobuf.Duration dns_refresh_rate = 3 [(.validate.rules) = { ... }
      Specified by:
      getDnsRefreshRateOrBuilder in interface DnsCacheConfigOrBuilder
    • hasHostTtl

      public boolean hasHostTtl()
       The TTL for hosts that are unused. Hosts that have not been used in the configured time
       interval will be purged. If not specified defaults to 5m.
      
       .. note:
      
         The TTL is only checked at the time of DNS refresh, as specified by *dns_refresh_rate*. This
         means that if the configured TTL is shorter than the refresh rate the host may not be removed
         immediately.
      
        .. note:
      
         The TTL has no relation to DNS TTL and is only used to control Envoy's resource usage.
       
      .google.protobuf.Duration host_ttl = 4 [(.validate.rules) = { ... }
      Specified by:
      hasHostTtl in interface DnsCacheConfigOrBuilder
      Returns:
      Whether the hostTtl field is set.
    • getHostTtl

      public com.google.protobuf.Duration getHostTtl()
       The TTL for hosts that are unused. Hosts that have not been used in the configured time
       interval will be purged. If not specified defaults to 5m.
      
       .. note:
      
         The TTL is only checked at the time of DNS refresh, as specified by *dns_refresh_rate*. This
         means that if the configured TTL is shorter than the refresh rate the host may not be removed
         immediately.
      
        .. note:
      
         The TTL has no relation to DNS TTL and is only used to control Envoy's resource usage.
       
      .google.protobuf.Duration host_ttl = 4 [(.validate.rules) = { ... }
      Specified by:
      getHostTtl in interface DnsCacheConfigOrBuilder
      Returns:
      The hostTtl.
    • getHostTtlOrBuilder

      public com.google.protobuf.DurationOrBuilder getHostTtlOrBuilder()
       The TTL for hosts that are unused. Hosts that have not been used in the configured time
       interval will be purged. If not specified defaults to 5m.
      
       .. note:
      
         The TTL is only checked at the time of DNS refresh, as specified by *dns_refresh_rate*. This
         means that if the configured TTL is shorter than the refresh rate the host may not be removed
         immediately.
      
        .. note:
      
         The TTL has no relation to DNS TTL and is only used to control Envoy's resource usage.
       
      .google.protobuf.Duration host_ttl = 4 [(.validate.rules) = { ... }
      Specified by:
      getHostTtlOrBuilder in interface DnsCacheConfigOrBuilder
    • hasMaxHosts

      public boolean hasMaxHosts()
       The maximum number of hosts that the cache will hold. If not specified defaults to 1024.
      
       .. note:
      
         The implementation is approximate and enforced independently on each worker thread, thus
         it is possible for the maximum hosts in the cache to go slightly above the configured
         value depending on timing. This is similar to how other circuit breakers work.
       
      .google.protobuf.UInt32Value max_hosts = 5 [(.validate.rules) = { ... }
      Specified by:
      hasMaxHosts in interface DnsCacheConfigOrBuilder
      Returns:
      Whether the maxHosts field is set.
    • getMaxHosts

      public com.google.protobuf.UInt32Value getMaxHosts()
       The maximum number of hosts that the cache will hold. If not specified defaults to 1024.
      
       .. note:
      
         The implementation is approximate and enforced independently on each worker thread, thus
         it is possible for the maximum hosts in the cache to go slightly above the configured
         value depending on timing. This is similar to how other circuit breakers work.
       
      .google.protobuf.UInt32Value max_hosts = 5 [(.validate.rules) = { ... }
      Specified by:
      getMaxHosts in interface DnsCacheConfigOrBuilder
      Returns:
      The maxHosts.
    • getMaxHostsOrBuilder

      public com.google.protobuf.UInt32ValueOrBuilder getMaxHostsOrBuilder()
       The maximum number of hosts that the cache will hold. If not specified defaults to 1024.
      
       .. note:
      
         The implementation is approximate and enforced independently on each worker thread, thus
         it is possible for the maximum hosts in the cache to go slightly above the configured
         value depending on timing. This is similar to how other circuit breakers work.
       
      .google.protobuf.UInt32Value max_hosts = 5 [(.validate.rules) = { ... }
      Specified by:
      getMaxHostsOrBuilder in interface DnsCacheConfigOrBuilder
    • hasDnsFailureRefreshRate

      public boolean hasDnsFailureRefreshRate()
       If the DNS failure refresh rate is specified,
       this is used as the cache's DNS refresh rate when DNS requests are failing. If this setting is
       not specified, the failure refresh rate defaults to the dns_refresh_rate.
       
      .envoy.api.v2.Cluster.RefreshRate dns_failure_refresh_rate = 6;
      Specified by:
      hasDnsFailureRefreshRate in interface DnsCacheConfigOrBuilder
      Returns:
      Whether the dnsFailureRefreshRate field is set.
    • getDnsFailureRefreshRate

      public Cluster.RefreshRate getDnsFailureRefreshRate()
       If the DNS failure refresh rate is specified,
       this is used as the cache's DNS refresh rate when DNS requests are failing. If this setting is
       not specified, the failure refresh rate defaults to the dns_refresh_rate.
       
      .envoy.api.v2.Cluster.RefreshRate dns_failure_refresh_rate = 6;
      Specified by:
      getDnsFailureRefreshRate in interface DnsCacheConfigOrBuilder
      Returns:
      The dnsFailureRefreshRate.
    • getDnsFailureRefreshRateOrBuilder

      public Cluster.RefreshRateOrBuilder getDnsFailureRefreshRateOrBuilder()
       If the DNS failure refresh rate is specified,
       this is used as the cache's DNS refresh rate when DNS requests are failing. If this setting is
       not specified, the failure refresh rate defaults to the dns_refresh_rate.
       
      .envoy.api.v2.Cluster.RefreshRate dns_failure_refresh_rate = 6;
      Specified by:
      getDnsFailureRefreshRateOrBuilder in interface DnsCacheConfigOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static DnsCacheConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DnsCacheConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DnsCacheConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DnsCacheConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DnsCacheConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DnsCacheConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static DnsCacheConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DnsCacheConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DnsCacheConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static DnsCacheConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DnsCacheConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static DnsCacheConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public DnsCacheConfig.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static DnsCacheConfig.Builder newBuilder()
    • newBuilder

      public static DnsCacheConfig.Builder newBuilder(DnsCacheConfig prototype)
    • toBuilder

      public DnsCacheConfig.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected DnsCacheConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static DnsCacheConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<DnsCacheConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<DnsCacheConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public DnsCacheConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder