rdns

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(c *caddy.Controller) error

Types

type ETCD

type ETCD struct {
	Next          plugin.Handler
	Fall          fall.F
	Zones         []string
	PathPrefix    string
	Upstream      *upstream.Upstream
	Client        *etcdcv3.Client
	WildcardBound int8 // Calculate the boundary of WildcardDNS
	// contains filtered or unexported fields
}

func (*ETCD) IsNameError

func (e *ETCD) IsNameError(err error) bool

IsNameError implements the ServiceBackend interface.

func (*ETCD) Lookup

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

Lookup implements the ServiceBackend interface.

func (*ETCD) MinTTL

func (e *ETCD) MinTTL(state request.Request) uint32

MinTTL implements the Transferer interface.

func (*ETCD) Name

func (e *ETCD) Name() string

Name implements the Handler interface.

func (*ETCD) Records

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

Records looks up records in etcd. If exact is true, it will lookup just this name. This is used when find matches when completing SRV lookups for instance.

func (*ETCD) Reverse

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

Reverse implements the ServiceBackend interface.

func (*ETCD) Serial

func (e *ETCD) Serial(state request.Request) uint32

Serial implements the Transferer interface.

func (*ETCD) ServeDNS

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

ServeDNS implements the plugin.Handler interface.

func (*ETCD) Services

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

Services implements the ServiceBackend interface.

func (*ETCD) TTL

func (e *ETCD) TTL(kv *mvccpb.KeyValue, serv *msg.Service) uint32

TTL returns the smaller of the etcd TTL and the service's TTL. If neither of these are set (have a zero value), a default is used.

func (*ETCD) Transfer

func (e *ETCD) Transfer(ctx context.Context, state request.Request) (int, error)

Transfer implements the Transferer interface.

Directories

Path Synopsis
Package msg defines the Service structure which is used for service discovery.
Package msg defines the Service structure which is used for service discovery.

Jump to

Keyboard shortcuts

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