resolver

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2016 License: Apache-2.0 Imports: 18 Imported by: 12

Documentation

Overview

Package resolver contains functions to handle resolving .mesos domains

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver holds configuration state and the resource records

func New added in v0.1.2

func New(version string, config records.Config) *Resolver

New returns a Resolver with the given version and configuration.

func (*Resolver) HandleMesos

func (res *Resolver) HandleMesos(w dns.ResponseWriter, r *dns.Msg)

HandleMesos is a resolver request handler that responds to a resource question with resource answer(s) it can handle {A, SRV, ANY}

func (*Resolver) HandleNonMesos

func (res *Resolver) HandleNonMesos(w dns.ResponseWriter, r *dns.Msg)

HandleNonMesos handles non-mesos queries by forwarding to configured external DNS servers.

func (*Resolver) LaunchDNS added in v0.1.2

func (res *Resolver) LaunchDNS() <-chan error

LaunchDNS starts a (TCP and UDP) DNS server for the Resolver, returning a error channel to which errors are asynchronously sent.

func (*Resolver) LaunchHTTP added in v0.1.2

func (res *Resolver) LaunchHTTP() <-chan error

LaunchHTTP starts an HTTP server for the Resolver, returning a error channel to which errors are asynchronously sent.

func (*Resolver) Reload

func (res *Resolver) Reload()

Reload triggers a new state load from the configured mesos masters. This method is not goroutine-safe.

func (*Resolver) RestAXFR added in v0.6.0

func (res *Resolver) RestAXFR(req *restful.Request, resp *restful.Response)

RestAXFR handles HTTP requests to turn the zone into a transferable format

func (*Resolver) RestConfig added in v0.1.2

func (res *Resolver) RestConfig(req *restful.Request, resp *restful.Response)

RestConfig handles HTTP requests of Resolver configuration.

func (*Resolver) RestEnumerate added in v0.5.2

func (res *Resolver) RestEnumerate(req *restful.Request, resp *restful.Response)

RestEnumerate handles HTTP requests of the enumeration data

func (*Resolver) RestHost added in v0.1.2

func (res *Resolver) RestHost(req *restful.Request, resp *restful.Response)

RestHost handles HTTP requests of DNS A records of the given host.

func (*Resolver) RestPorts added in v0.1.2

func (res *Resolver) RestPorts(req *restful.Request, resp *restful.Response)

RestPorts is an HTTP handler which is currently not implemented.

func (*Resolver) RestService added in v0.1.2

func (res *Resolver) RestService(req *restful.Request, resp *restful.Response)

RestService handles HTTP requests of DNS SRV records for the given name.

func (*Resolver) RestVersion added in v0.1.2

func (res *Resolver) RestVersion(req *restful.Request, resp *restful.Response)

RestVersion handles HTTP requests of Mesos-DNS version.

func (*Resolver) Serve

func (res *Resolver) Serve(proto string) (<-chan struct{}, <-chan error)

Serve starts a DNS server for net protocol (tcp/udp), returns immediately. the returned signal chan is closed upon the server successfully entering the listening phase. if the server aborts then an error is sent on the error chan.

func (*Resolver) SetMasters added in v0.2.0

func (res *Resolver) SetMasters(masters []string)

SetMasters sets the given masters. This method is not goroutine-safe.

Jump to

Keyboard shortcuts

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