dns

package
v2.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginName string = "yunion"
)

Variables

View Source
var (
	DNSTypeMap map[uint16]string = map[uint16]string{
		dns.TypeA:     "A",
		dns.TypeAAAA:  "AAAA",
		dns.TypeTXT:   "TXT",
		dns.TypeCNAME: "CNAME",
		dns.TypePTR:   "PTR",
		dns.TypeMX:    "MX",
		dns.TypeSRV:   "SRV",
		dns.TypeSOA:   "SOA",
		dns.TypeNS:    "NS",
	}
)

Functions

This section is empty.

Types

type K8sQueryInfo

type K8sQueryInfo struct {
	ServiceName string
	Namespace   string
}

type SRegionDNS

type SRegionDNS struct {
	Next          plugin.Handler
	Fall          fall.F
	Zones         []string
	PrimaryZone   string
	Upstream      upstream.Upstream
	SqlConnection string
	K8sConfigFile string
	K8sClient     *kubernetes.Clientset
}

func New

func New() *SRegionDNS

func (*SRegionDNS) CloseDB

func (r *SRegionDNS) CloseDB()

func (*SRegionDNS) IsCloudNetworkIp

func (r *SRegionDNS) IsCloudNetworkIp(req *recordRequest) bool

func (*SRegionDNS) IsK8sClientReady

func (r *SRegionDNS) IsK8sClientReady() bool

func (*SRegionDNS) IsNameError

func (r *SRegionDNS) IsNameError(err error) bool

IsNameError implements the ServiceBackend interface

func (*SRegionDNS) Lookup

func (r *SRegionDNS) Lookup(state request.Request, name string, typ uint16) (*dns.Msg, error)

Lookup implements the ServiceBackend interface

func (*SRegionDNS) MinTTL

func (r *SRegionDNS) MinTTL(state request.Request) uint32

MinTTL implements the Transferer interface

func (*SRegionDNS) Name

func (r *SRegionDNS) Name() string

func (*SRegionDNS) Records

func (r *SRegionDNS) Records(state request.Request, exact bool) ([]msg.Service, error)

Records looks up records in region mysql

func (*SRegionDNS) Reverse

func (r *SRegionDNS) Reverse(state request.Request, exact bool, opt plugin.Options) (services []msg.Service, err error)

Reverse implements the ServiceBackend interface

func (*SRegionDNS) Serial

func (r *SRegionDNS) Serial(state request.Request) uint32

Serial implements the Transferer interface

func (*SRegionDNS) ServeDNS

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

func (*SRegionDNS) Services

func (r *SRegionDNS) Services(state request.Request, exact bool, opt plugin.Options) (services []msg.Service, err error)

Services implements the ServiceBackend interface

func (*SRegionDNS) Transfer

func (r *SRegionDNS) Transfer(ctx context.Context, state request.Request) (int, error)

Transferer implements the Transferer interface

Jump to

Keyboard shortcuts

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