Documentation ¶
Overview ¶
Package resolver contains functions to handle resolving .mesos domains
Index ¶
- type Resolver
- func (res *Resolver) HandleMesos(w dns.ResponseWriter, r *dns.Msg)
- func (res *Resolver) HandleNonMesos(fwd exchanger.Forwarder) func(dns.ResponseWriter, *dns.Msg)
- func (res *Resolver) LaunchDNS() <-chan error
- func (res *Resolver) LaunchHTTP() <-chan error
- func (res *Resolver) Ready() <-chan struct{}
- func (res *Resolver) Reload()
- func (res *Resolver) RestAXFR(req *restful.Request, resp *restful.Response)
- func (res *Resolver) RestConfig(req *restful.Request, resp *restful.Response)
- func (res *Resolver) RestEnumerate(req *restful.Request, resp *restful.Response)
- func (res *Resolver) RestHost(req *restful.Request, resp *restful.Response)
- func (res *Resolver) RestPorts(req *restful.Request, resp *restful.Response)
- func (res *Resolver) RestService(req *restful.Request, resp *restful.Response)
- func (res *Resolver) RestVersion(req *restful.Request, resp *restful.Response)
- func (res *Resolver) Serve(proto string) (<-chan struct{}, <-chan error)
- func (res *Resolver) SetMasters(masters []string)
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 (*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 ¶
HandleNonMesos handles non-mesos queries by forwarding to configured external DNS servers.
func (*Resolver) LaunchDNS ¶
LaunchDNS starts a (TCP and UDP) DNS server for the Resolver, returning a error channel to which errors are asynchronously sent.
func (*Resolver) LaunchHTTP ¶
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 ¶
RestAXFR handles HTTP requests to turn the zone into a transferable format
func (*Resolver) RestConfig ¶
RestConfig handles HTTP requests of Resolver configuration.
func (*Resolver) RestEnumerate ¶
RestEnumerate handles HTTP requests of the enumeration data
func (*Resolver) RestService ¶
RestService handles HTTP requests of DNS SRV records for the given name.
func (*Resolver) RestVersion ¶
RestVersion handles HTTP requests of Mesos-DNS version.
func (*Resolver) Serve ¶
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 ¶
SetMasters sets the given masters. This method is not goroutine-safe.