crosscluster

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 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 CrossCluster

type CrossCluster struct {
	Next plugin.Handler

	RecordsCache *endpointslicedns.DNSCache
	Zones        []string
	Log          logr.Logger
}

func (*CrossCluster) IsNameError

func (c *CrossCluster) IsNameError(err error) bool

IsNameError returns true if err indicated a record not found condition

func (*CrossCluster) Lookup

func (c *CrossCluster) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error)

Lookup is used to find records else where.

func (*CrossCluster) MinTTL

func (c *CrossCluster) MinTTL(state request.Request) uint32

MinTTL returns the minimum TTL to be used in the SOA record.

func (*CrossCluster) Name

func (c *CrossCluster) Name() string

func (*CrossCluster) Records

func (c *CrossCluster) Records(ctx context.Context, state request.Request, exact bool) ([]msg.Service, error)

Returns _all_ services that matches a certain name. Note: it does not implement a specific service.

func (*CrossCluster) Reverse

func (c *CrossCluster) Reverse(ctx context.Context, state request.Request, exact bool, opt plugin.Options) ([]msg.Service, error)

Reverse communicates with the backend to retrieve service definition based on a IP address instead of a name. I.e. a reverse DNS lookup.

func (*CrossCluster) Serial

func (c *CrossCluster) Serial(state request.Request) uint32

Serial returns a SOA serial number to construct a SOA record.

func (*CrossCluster) ServeDNS

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

func (*CrossCluster) Services

func (c *CrossCluster) Services(ctx context.Context, state request.Request, exact bool, opt plugin.Options) ([]msg.Service, error)

Services communicates with the backend to retrieve the service definitions. Exact indicates on exact match should be returned.

func (*CrossCluster) Transfer

func (c *CrossCluster) Transfer(ctx context.Context, state request.Request) (int, error)

Transfer handles a zone transfer it writes to the client just like any other handler.

Jump to

Keyboard shortcuts

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