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(w dns.ResponseWriter, r *dns.Msg)
- func (res *Resolver) LaunchDNS() <-chan error
- func (res *Resolver) LaunchHTTP() <-chan error
- 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, 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
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
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 ¶
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
SetMasters sets the given masters. This method is not goroutine-safe.