Documentation
¶
Index ¶
- Variables
- type DnsCacheConfig
- func (x *DnsCacheConfig) ClearDnsFailureRefreshRate()
- func (x *DnsCacheConfig) ClearDnsRefreshRate()
- func (x *DnsCacheConfig) ClearHostTtl()
- func (x *DnsCacheConfig) ClearMaxHosts()
- func (x *DnsCacheConfig) GetDnsFailureRefreshRate() *v2.Cluster_RefreshRate
- func (x *DnsCacheConfig) GetDnsLookupFamily() v2.Cluster_DnsLookupFamily
- func (x *DnsCacheConfig) GetDnsRefreshRate() *durationpb.Duration
- func (x *DnsCacheConfig) GetHostTtl() *durationpb.Duration
- func (x *DnsCacheConfig) GetMaxHosts() *wrapperspb.UInt32Value
- func (x *DnsCacheConfig) GetName() string
- func (x *DnsCacheConfig) HasDnsFailureRefreshRate() bool
- func (x *DnsCacheConfig) HasDnsRefreshRate() bool
- func (x *DnsCacheConfig) HasHostTtl() bool
- func (x *DnsCacheConfig) HasMaxHosts() bool
- func (*DnsCacheConfig) ProtoMessage()
- func (x *DnsCacheConfig) ProtoReflect() protoreflect.Message
- func (x *DnsCacheConfig) Reset()
- func (x *DnsCacheConfig) SetDnsFailureRefreshRate(v *v2.Cluster_RefreshRate)
- func (x *DnsCacheConfig) SetDnsLookupFamily(v v2.Cluster_DnsLookupFamily)
- func (x *DnsCacheConfig) SetDnsRefreshRate(v *durationpb.Duration)
- func (x *DnsCacheConfig) SetHostTtl(v *durationpb.Duration)
- func (x *DnsCacheConfig) SetMaxHosts(v *wrapperspb.UInt32Value)
- func (x *DnsCacheConfig) SetName(v string)
- func (x *DnsCacheConfig) String() string
- type DnsCacheConfig_builder
Constants ¶
This section is empty.
Variables ¶
View Source
var File_envoy_config_common_dynamic_forward_proxy_v2alpha_dns_cache_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DnsCacheConfig ¶
type DnsCacheConfig struct {
// 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.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// 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.]
DnsLookupFamily v2.Cluster_DnsLookupFamily `` /* 151-byte string literal not displayed */
// 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.
DnsRefreshRate *durationpb.Duration `protobuf:"bytes,3,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"`
// 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.
HostTtl *durationpb.Duration `protobuf:"bytes,4,opt,name=host_ttl,json=hostTtl,proto3" json:"host_ttl,omitempty"`
// 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.
MaxHosts *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=max_hosts,json=maxHosts,proto3" json:"max_hosts,omitempty"`
// 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.
DnsFailureRefreshRate *v2.Cluster_RefreshRate `` /* 128-byte string literal not displayed */
// contains filtered or unexported fields
}
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]
func (*DnsCacheConfig) ClearDnsFailureRefreshRate ¶
func (x *DnsCacheConfig) ClearDnsFailureRefreshRate()
func (*DnsCacheConfig) ClearDnsRefreshRate ¶
func (x *DnsCacheConfig) ClearDnsRefreshRate()
func (*DnsCacheConfig) ClearHostTtl ¶
func (x *DnsCacheConfig) ClearHostTtl()
func (*DnsCacheConfig) ClearMaxHosts ¶
func (x *DnsCacheConfig) ClearMaxHosts()
func (*DnsCacheConfig) GetDnsFailureRefreshRate ¶
func (x *DnsCacheConfig) GetDnsFailureRefreshRate() *v2.Cluster_RefreshRate
func (*DnsCacheConfig) GetDnsLookupFamily ¶
func (x *DnsCacheConfig) GetDnsLookupFamily() v2.Cluster_DnsLookupFamily
func (*DnsCacheConfig) GetDnsRefreshRate ¶
func (x *DnsCacheConfig) GetDnsRefreshRate() *durationpb.Duration
func (*DnsCacheConfig) GetHostTtl ¶
func (x *DnsCacheConfig) GetHostTtl() *durationpb.Duration
func (*DnsCacheConfig) GetMaxHosts ¶
func (x *DnsCacheConfig) GetMaxHosts() *wrapperspb.UInt32Value
func (*DnsCacheConfig) GetName ¶
func (x *DnsCacheConfig) GetName() string
func (*DnsCacheConfig) HasDnsFailureRefreshRate ¶
func (x *DnsCacheConfig) HasDnsFailureRefreshRate() bool
func (*DnsCacheConfig) HasDnsRefreshRate ¶
func (x *DnsCacheConfig) HasDnsRefreshRate() bool
func (*DnsCacheConfig) HasHostTtl ¶
func (x *DnsCacheConfig) HasHostTtl() bool
func (*DnsCacheConfig) HasMaxHosts ¶
func (x *DnsCacheConfig) HasMaxHosts() bool
func (*DnsCacheConfig) ProtoMessage ¶
func (*DnsCacheConfig) ProtoMessage()
func (*DnsCacheConfig) ProtoReflect ¶
func (x *DnsCacheConfig) ProtoReflect() protoreflect.Message
func (*DnsCacheConfig) Reset ¶
func (x *DnsCacheConfig) Reset()
func (*DnsCacheConfig) SetDnsFailureRefreshRate ¶
func (x *DnsCacheConfig) SetDnsFailureRefreshRate(v *v2.Cluster_RefreshRate)
func (*DnsCacheConfig) SetDnsLookupFamily ¶
func (x *DnsCacheConfig) SetDnsLookupFamily(v v2.Cluster_DnsLookupFamily)
func (*DnsCacheConfig) SetDnsRefreshRate ¶
func (x *DnsCacheConfig) SetDnsRefreshRate(v *durationpb.Duration)
func (*DnsCacheConfig) SetHostTtl ¶
func (x *DnsCacheConfig) SetHostTtl(v *durationpb.Duration)
func (*DnsCacheConfig) SetMaxHosts ¶
func (x *DnsCacheConfig) SetMaxHosts(v *wrapperspb.UInt32Value)
func (*DnsCacheConfig) SetName ¶
func (x *DnsCacheConfig) SetName(v string)
func (*DnsCacheConfig) String ¶
func (x *DnsCacheConfig) String() string
type DnsCacheConfig_builder ¶
type DnsCacheConfig_builder struct {
// 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.
Name string
// 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.]
DnsLookupFamily v2.Cluster_DnsLookupFamily
// 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.
DnsRefreshRate *durationpb.Duration
// 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.
HostTtl *durationpb.Duration
// 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.
MaxHosts *wrapperspb.UInt32Value
// 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.
DnsFailureRefreshRate *v2.Cluster_RefreshRate
// contains filtered or unexported fields
}
func (DnsCacheConfig_builder) Build ¶
func (b0 DnsCacheConfig_builder) Build() *DnsCacheConfig
Source Files
¶
- dns_cache.pb.go
Click to show internal directories.
Click to hide internal directories.