discovery

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: Apache-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroConfServiceName = "_eliot._tcp"

ZeroConfServiceName is the service name for discovering the eliotd

Functions

func Devices

func Devices(timeout time.Duration) (devices []*device.Info, err error)

Devices return list of DeviceInfos synchronously with given timeout

func DevicesAsync

func DevicesAsync(results chan<- *device.Info, timeout time.Duration) error

DevicesAsync search for devices in network asynchronously for given timeout

func MapToAPIModel added in v0.2.5

func MapToAPIModel(entry *zeroconf.ServiceEntry) *device.Info

Types

type Server

type Server struct {
	Name    string
	Domain  string
	Port    int
	Version string
	// contains filtered or unexported fields
}

Server is zeroconf discovery server

func NewServer

func NewServer(name string, port int, version string) *Server

NewServer creates new discovery server

func (*Server) Serve added in v0.2.0

func (s *Server) Serve()

Serve starts the discovery server

func (*Server) Stop

func (s *Server) Stop()

Stop server to be discoverable

Jump to

Keyboard shortcuts

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