Documentation
¶
Overview ¶
Package discovery with client for service discovery
Package discovery with client for service discovery
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoverServices ¶
func DiscoverServices(serviceName string, waitSec int) ( address string, port uint, params map[string]string, records []*zeroconf.ServiceEntry, err error)
DiscoverServices searches for WoST services with the given name and returns all its instances. This is a wrapper around various means of discovering services and supports the discovery of multiple instances of the same service (name). The serviceName must contain the simple name of the WoST service. For example, use 'idprov' for the provisioning service which DNS-SD will publish as _idprov._tcp.
serviceName is the name of the service to discover waitSec is the time to wait for the result
Returns the first instance address, port and discovery parameters, plus records of additional discoveries, or an error if nothing is found
func DnsSDScan ¶
func DnsSDScan(sdType string, waitSec int) ([]*zeroconf.ServiceEntry, error)
DnsSdScan scans zeroconf publications on local domain The zeroconf library does not support browsing of all services, but a workaround is to search the service types with "_services._dns-sd._udp" then query each of the service types.
serviceType to look for, or "" to discover all service types (not all services)
Types ¶
This section is empty.