Documentation ¶
Index ¶
- type LocalDNSServer
- func (h *LocalDNSServer) BuildAlternateHosts(nt *dnsProto.NameTable, ...)
- func (h *LocalDNSServer) Close()
- func (h *LocalDNSServer) IsReady() bool
- func (h *LocalDNSServer) NameTable() *dnsProto.NameTable
- func (h *LocalDNSServer) ServeDNS(proxy *dnsProxy, w dns.ResponseWriter, req *dns.Msg)
- func (h *LocalDNSServer) StartDNS()
- func (h *LocalDNSServer) UpdateLookupTable(nt *dnsProto.NameTable)
- type LookupTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalDNSServer ¶
type LocalDNSServer struct {
// contains filtered or unexported fields
}
LocalDNSServer holds configurations for the DNS downstreamUDPServer in Istio Agent
func NewLocalDNSServer ¶
func NewLocalDNSServer(proxyNamespace, proxyDomain string, addr string, forwardToUpstreamParallel bool) (*LocalDNSServer, error)
func (*LocalDNSServer) BuildAlternateHosts ¶
func (h *LocalDNSServer) BuildAlternateHosts(nt *dnsProto.NameTable, apply func(map[string]struct{}, []netip.Addr, []netip.Addr, []string), )
BuildAlternateHosts builds alternate hosts for Kubernetes services in the name table and calls the passed in function with the built alternate hosts.
func (*LocalDNSServer) Close ¶
func (h *LocalDNSServer) Close()
func (*LocalDNSServer) IsReady ¶
func (h *LocalDNSServer) IsReady() bool
IsReady returns true if DNS lookup table is updated at least once.
func (*LocalDNSServer) NameTable ¶
func (h *LocalDNSServer) NameTable() *dnsProto.NameTable
func (*LocalDNSServer) ServeDNS ¶
func (h *LocalDNSServer) ServeDNS(proxy *dnsProxy, w dns.ResponseWriter, req *dns.Msg)
ServeDNS is the implementation of DNS interface
func (*LocalDNSServer) StartDNS ¶
func (h *LocalDNSServer) StartDNS()
StartDNS starts DNS-over-UDP and DNS-over-TCP servers.
func (*LocalDNSServer) UpdateLookupTable ¶
func (h *LocalDNSServer) UpdateLookupTable(nt *dnsProto.NameTable)
type LookupTable ¶
type LookupTable struct {
// contains filtered or unexported fields
}
LookupTable is borrowed from https://github.com/coredns/coredns/blob/master/plugin/hosts/hostsfile.go
Click to show internal directories.
Click to hide internal directories.