Documentation ¶
Index ¶
- Constants
- Variables
- func NewMsgEvent(msg *dns.Msg, addr net.Addr, ifIndex int) gopi.Event
- func NewService(zone string) *service
- func NewServices(msg *dns.Msg, zone string) *services
- func NewTokenizer(src string) *tokenizer
- func Quote(src string) string
- func Unquote(src string) (string, error)
- type Discovery
- type FuncRecordsForService
- type FuncServices
- type Listener
- func (this *Listener) AddrForIface(ifIndex int, flags gopi.ServiceFlag) []net.IP
- func (this *Listener) Define(cfg gopi.Config) error
- func (this *Listener) Dispose() error
- func (this *Listener) New(cfg gopi.Config) error
- func (this *Listener) Run(ctx context.Context) error
- func (this *Listener) Send(msg *dns.Msg, ifIndex int) error
- func (this *Listener) String() string
- func (this *Listener) Zone() string
- type Responder
- func (this *Responder) NewServiceRecord(service string, name string, port uint16, txt []string, flags gopi.ServiceFlag) (gopi.ServiceRecord, error)
- func (this *Responder) ProcessQuestion(msg *msgevent) error
- func (this *Responder) Records(name string) []gopi.ServiceRecord
- func (this *Responder) Run(ctx context.Context) error
- func (this *Responder) SendAnswers(ifIndex int, msgs []*dns.Msg) error
- func (this *Responder) Serve(ctx context.Context, r []gopi.ServiceRecord) error
- func (this *Responder) Services() []string
- func (this *Responder) SetServices(r []gopi.ServiceRecord) error
Constants ¶
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 NewMsgEvent ¶ added in v3.0.3
func NewService ¶ added in v3.0.3
func NewService(zone string) *service
func NewServices ¶ added in v3.0.3
Parse DNS message and capture service records
func NewTokenizer ¶ added in v3.0.3
func NewTokenizer(src string) *tokenizer
Types ¶
type FuncRecordsForService ¶ added in v3.0.3
type FuncRecordsForService func(string) []gopi.ServiceRecord
FuncRecordsForService returns service records for named service
type FuncServices ¶ added in v3.0.3
type FuncServices func() []string
FuncServices returns fully-qualified service names
type Listener ¶
type Listener struct { sync.RWMutex sync.WaitGroup gopi.Unit gopi.Logger gopi.Publisher // contains filtered or unexported fields }
func (*Listener) AddrForIface ¶ added in v3.0.3
type Responder ¶ added in v3.0.3
type Responder struct { gopi.Unit gopi.Publisher gopi.Logger sync.WaitGroup sync.RWMutex *Listener // contains filtered or unexported fields }
func (*Responder) NewServiceRecord ¶ added in v3.0.3
func (this *Responder) NewServiceRecord(service string, name string, port uint16, txt []string, flags gopi.ServiceFlag) (gopi.ServiceRecord, error)
func (*Responder) ProcessQuestion ¶ added in v3.0.3
func (*Responder) Records ¶ added in v3.0.3
func (this *Responder) Records(name string) []gopi.ServiceRecord
func (*Responder) SendAnswers ¶ added in v3.0.7
func (*Responder) SetServices ¶ added in v3.0.3
func (this *Responder) SetServices(r []gopi.ServiceRecord) error
Click to show internal directories.
Click to hide internal directories.