Documentation ¶
Index ¶
- Constants
- Variables
- func NewDiscovery(c <-chan message) (*discovery, error)
- func NewListener(domain, iface string, c chan<- message) (*listener, error)
- func NewTokenizer(src string) *tokenizer
- func Quote(src string) string
- func Unquote(src string) (string, error)
- type Config
- type Server
- func (this Server) Changed(v *Service) bool
- func (this Server) Delete(v *Service)
- func (this Server) Exists(v *Service) *Service
- func (this Server) Get(name string) *Service
- func (this *Server) Instances(ctx context.Context, services ...string) []Service
- func (this Server) Query(ctx context.Context, msg *dns.Msg, iface int) error
- func (this *Server) Run(ctx context.Context) error
- func (this Server) Send(msg *dns.Msg, ifIndex int) error
- func (this Server) Set(v *Service)
- func (this *Server) String() string
- type Service
- func (this *Service) Addrs() []net.IP
- func (this *Service) Equals(other *Service) bool
- func (this *Service) Host() string
- func (this *Service) Instance() string
- func (this *Service) Name() string
- func (this *Service) Port() uint16
- func (this *Service) Service() string
- func (this *Service) SetA(ip net.IP)
- func (this *Service) SetAAAA(ip net.IP)
- func (this *Service) SetPTR(ptr *dns.PTR)
- func (this *Service) SetSRV(host string, port uint16, priority uint16)
- func (this *Service) SetTXT(txt []string)
- func (this *Service) String() string
- func (this *Service) Txt() []string
- func (this *Service) Zone() string
Constants ¶
View Source
const ( ServicesQuery = "_services._dns-sd._udp" DefaultTTL = 60 * 5 // In seconds (5 mins) )
View Source
const (
EOF rune = -(iota + 1)
)
Variables ¶
View Source
var ( MULTICAST_ADDR_IPV4 = &net.UDPAddr{IP: net.ParseIP("224.0.0.251"), Port: 5353} MULTICAST_ADDR_IPV6 = &net.UDPAddr{IP: net.ParseIP("ff02::fb"), Port: 5353} )
View Source
var (
ErrParseError = errors.New("Parse Error")
)
Functions ¶
func NewDiscovery ¶
func NewDiscovery(c <-chan message) (*discovery, error)
func NewListener ¶
func NewTokenizer ¶
func NewTokenizer(src string) *tokenizer
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.