Documentation ¶
Index ¶
- Constants
- func LinkLocalMulticastListener(ifi *net.Interface) (net.PacketConn, error)
- func ListenHttp(domain string, db Zone, port int)
- func StartServer(zone Zone, iface *net.Interface, dnsPort int, wait int) error
- func StartUpdater(apiPath string, zone Zone) error
- type DuplicateError
- type Lookup
- type LookupError
- type LookupFunc
- type MDNSClient
- func (client *MDNSClient) LookupInaddr(inaddr string) (string, error)
- func (client *MDNSClient) LookupName(name string) (net.IP, error)
- func (c *MDNSClient) ResponseCallback(r *dns.Msg)
- func (c *MDNSClient) SendQuery(name string, querytype uint16, responseCh chan<- *Response)
- func (c *MDNSClient) Shutdown()
- func (c *MDNSClient) Start(ifi *net.Interface) error
- type MDNSInteraction
- type MDNSServer
- type Record
- type Response
- type Zone
- type ZoneDb
- func (zone *ZoneDb) AddRecord(ident string, name string, ip net.IP) error
- func (zone *ZoneDb) DeleteRecord(ident string, ip net.IP) error
- func (zone *ZoneDb) DeleteRecordsFor(ident string) error
- func (zone *ZoneDb) LookupInaddr(inaddr string) (string, error)
- func (zone *ZoneDb) LookupName(name string) (net.IP, error)
Constants ¶
View Source
const ( MaxDuration = time.Duration(math.MaxInt64) MailboxSize = 16 )
View Source
const ( CSendQuery = iota CShutdown CMessageReceived )
View Source
const (
LOCAL_DOMAIN = "weave.local."
)
View Source
const (
RDNS_DOMAIN = "in-addr.arpa."
)
Variables ¶
This section is empty.
Functions ¶
func LinkLocalMulticastListener ¶
func LinkLocalMulticastListener(ifi *net.Interface) (net.PacketConn, error)
func ListenHttp ¶
func StartUpdater ¶
Types ¶
type DuplicateError ¶
type DuplicateError struct { }
func (DuplicateError) Error ¶
func (dup DuplicateError) Error() string
type LookupError ¶
type LookupError string
func (LookupError) Error ¶
func (ops LookupError) Error() string
type MDNSClient ¶
type MDNSClient struct {
// contains filtered or unexported fields
}
func NewMDNSClient ¶
func NewMDNSClient() (*MDNSClient, error)
func (*MDNSClient) LookupInaddr ¶ added in v0.9.0
func (client *MDNSClient) LookupInaddr(inaddr string) (string, error)
func (*MDNSClient) LookupName ¶ added in v0.9.0
func (client *MDNSClient) LookupName(name string) (net.IP, error)
func (*MDNSClient) ResponseCallback ¶
func (c *MDNSClient) ResponseCallback(r *dns.Msg)
Async - called from dns library multiplexer
type MDNSInteraction ¶
type MDNSInteraction struct {
// contains filtered or unexported fields
}
type MDNSServer ¶
type MDNSServer struct {
// contains filtered or unexported fields
}
func NewMDNSServer ¶
func NewMDNSServer(zone Zone) (*MDNSServer, error)
type ZoneDb ¶
type ZoneDb struct {
// contains filtered or unexported fields
}
Very simple data structure for now, with linear searching. TODO: make more sophisticated to improve performance.
func (*ZoneDb) DeleteRecordsFor ¶
func (*ZoneDb) LookupInaddr ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.