Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableIPv4 ¶
DisableIPv4 is a server option that prevents the server from listening for IPv4 messages.
func DisableIPv6 ¶
DisableIPv6 is a server option that prevents the server from listening for IPv6 messages.
Types ¶
type Answer ¶
type Answer struct { // Unique contains the records that belong to "unique" record sets. // // A "unique" resource record set is one where all the records with // that name, rrtype, and rrclass are conceptually under the control // or ownership of a single responder, and it is expected that at // most one responder should respond to a query for that name, // rrtype, and rrclass. // // See // https://tools.ietf.org/html/rfc6762#section-2. Unique ResponseSections // // A "shared" resource record set is is one where several Multicast DNS // responders may have records with the same name, rrtype, and // rrclass, and several responders may respond to a particular query. // // See // https://tools.ietf.org/html/rfc6762#section-2. Shared ResponseSections }
Answer is an answer to a DNS question.
type Answerer ¶
type Answerer interface { // Answer populates an answer to a single DNS question. // The implementation must allow concurrent calls. Answer(context.Context, *Question, *Answer) error }
Answerer is an interface that provides answers to DNS questions.
type Option ¶
Option is a function that applies an option to a server created by NewServer().
func UseInterface ¶
UseInterface sets the network interface that is used by the server.
If this option is not provided, the server will choose the interface used to access the internet.
type Responder ¶
type Responder struct {
// contains filtered or unexported fields
}
Responder is an implementation of a multicast DNS responder for a single network interface.
type ResponseSections ¶
type ResponseSections struct { AnswerSection []dns.RR AuthoritySection []dns.RR AdditionalSection []dns.RR }
ResponseSections contains the various response sections of a response to a DNS query.
func (*ResponseSections) Additional ¶
func (rs *ResponseSections) Additional(records ...dns.RR)
Additional appends records to the "additional" section of the answer.
func (*ResponseSections) Answer ¶
func (rs *ResponseSections) Answer(records ...dns.RR)
Answer appends records to the "answer" section of the answer.
func (*ResponseSections) Authority ¶
func (rs *ResponseSections) Authority(records ...dns.RR)
Authority appends records to the "authority" section of the answer.
func (*ResponseSections) IsEmpty ¶
func (rs *ResponseSections) IsEmpty() bool
IsEmpty returns true if the response does not contain any records.
type UnionAnswerer ¶
type UnionAnswerer []Answerer
UnionAnswerer is an answerer that combines answers from multiple answerers.