Documentation
¶
Overview ¶
Package discovery to facilitate discovery of Hub services
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInterfaces ¶
Get a list of active network interfaces excluding the loopback interface
address to only return the interface that serves the given IP address
func ServeDiscovery ¶
func ServeDiscovery(instanceID string, serviceName string, address string, port uint, params map[string]string) (*zeroconf.Server, error)
ServeDiscovery publishes a WoST service for discovery. See also 'DiscoverService' for discovery of this published service.
WoST services use this to announce the service instance and how they can be reached on the local domain.
Instance = instance name of the service. Used to differentiate between services with the same name (type) ServiceName = name of the provided service, for example, ipp, idprov, wotdir
This is a wrapper around one or more discovery methods. Internally this uses DNS-SD but can be expanded with additional protocols in the future.
DNS-SD will publish this as _<instance>._<serviceName>._tcp instanceID is the unique ID of the service instance, usually the plugin-ID serviceName is the discover name. For example "idprov" address service listening IP address port service listing port params is a map of key-value pairs to include in discovery, for example {path:/idprov/}
Returns the discovery service instance. Use Shutdown() when done.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.