bonjour

package
v0.0.0-...-67cf1be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answerer

type Answerer struct {
	Resolver resolver.Resolver
	// contains filtered or unexported fields
}

Answerer is an mDNS answerer that answers questions about DNS-SD services, thus making a Bonjour server.

func (*Answerer) AddInstance

func (an *Answerer) AddInstance(i *dnssd.Instance)

AddInstance adds a service instance to the answerer.

It panics if i is invalid.

func (*Answerer) Answer

func (an *Answerer) Answer(
	ctx context.Context,
	q *responder.Question,
	a *responder.Answer,
) error

Answer populates an answer to a single DNS question.

func (*Answerer) RemoveInstance

func (an *Answerer) RemoveInstance(
	instance dnssd.InstanceName,
	service dnssd.ServiceType,
	domain names.FQDN,
)

RemoveInstance removes a service instance from the handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL