multicluster_gw

package module
v0.0.0-...-2a518c3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Gateway_ip4 net.IP
	Gateway_ip6 net.IP
)

Functions

func NewAAAARecord

func NewAAAARecord(name string, ip net.IP) *dns.AAAA

NewAAAA returns a new AAAA record based on the Service.

func NewARecord

func NewARecord(name string, ip net.IP) *dns.A

NewA returns a new A record based on the Service.

Types

type Multicluster_gw

type Multicluster_gw struct {
	Next         plugin.Handler
	Zones        []string
	Fall         fall.F
	ClientConfig clientcmd.ClientConfig
	// contains filtered or unexported fields
}

MultiCluster implements a plugin supporting multi-cluster DNS spec using a gateway.

func New

func New(zones []string) *Multicluster_gw

func ParseStanza

func ParseStanza(c *caddy.Controller) (*Multicluster_gw, error)

ParseStanza parses a kubernetes stanza

func (Multicluster_gw) IsNameError

func (m Multicluster_gw) IsNameError(err error) bool

IsNameError returns true if err indicated a record not found condition

func (Multicluster_gw) Name

func (m Multicluster_gw) Name() string

Name implements the Handler interface.

func (Multicluster_gw) Ready

func (m Multicluster_gw) Ready() bool

Ready implements the ready.Readiness interface, once this flips to true CoreDNS assumes this plugin is ready for queries; it is not checked again.

func (Multicluster_gw) ServeDNS

func (m Multicluster_gw) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface.

type ResponsePrinter

type ResponsePrinter struct {
	dns.ResponseWriter
}

ResponsePrinter wrap a dns.ResponseWriter and will write example to standard output when WriteMsg is called.

func NewResponsePrinter

func NewResponsePrinter(w dns.ResponseWriter) *ResponsePrinter

NewResponsePrinter returns ResponseWriter.

func (*ResponsePrinter) WriteMsg

func (r *ResponsePrinter) WriteMsg(res *dns.Msg) error

WriteMsg calls the underlying ResponseWriter's WriteMsg method and prints "example" to standard output.

Jump to

Keyboard shortcuts

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