client

package
v0.0.0-...-1b34cb9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL