discovery

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 9 Imported by: 3

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 MapToAPIModel added in v0.2.5

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

func Nodes added in v0.2.8

func Nodes(timeout time.Duration) (nodes []*node.Info, err error)

Nodes return list of NodeInfos synchronously with given timeout

func NodesAsync added in v0.2.8

func NodesAsync(results chan<- *node.Info, timeout time.Duration) error

NodesAsync search for nodes in network asynchronously for given timeout

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