discovery

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: MIT Imports: 6 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 []model.DeviceInfo, err error)

Devices return list of DeviceInfos synchronously with given timeout

func DevicesAsync

func DevicesAsync(results chan<- model.DeviceInfo, timeout time.Duration) error

DevicesAsync search for devices in network asynchronously for given timeout

func MapToInternalModel

func MapToInternalModel(entry *zeroconf.ServiceEntry) model.DeviceInfo

Types

type Server

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

Server is zeroconf discovery server

func NewServer

func NewServer(name string, port int) *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