discovery

package
v0.0.0-...-a67a4a9 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

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