resolver

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

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

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, AAAA, SRV, SOA, NS, ANY}

func (*Resolver) HandleNonMesos

func (res *Resolver) HandleNonMesos(fwd exchanger.Forwarder) func(
	dns.ResponseWriter, *dns.Msg)

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

func (*Resolver) LaunchDNS

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

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) Ready added in v0.8.0

func (res *Resolver) Ready() <-chan struct{}

Ready blocks until the resolver has had a chance to reload at least once.

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

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

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

RestConfig handles HTTP requests of Resolver configuration.

func (*Resolver) RestEnumerate

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

RestEnumerate handles HTTP requests of the enumeration data

func (*Resolver) RestHost

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

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

RestPorts is an HTTP handler which is currently not implemented.

func (*Resolver) RestService

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

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

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