client

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Subscribe

func Subscribe(url, topic string, opt Options) (
	messages <-chan *types.Any,
	errors <-chan error,
	done chan<- struct{},
	err error,
)

Subscribe subscribes to a topic hosted at given url. It returns a channel of incoming events and errors as well as done which will close the connection and exit the subscriber.

Types

type Options

type Options struct {
	// SocketDir is the directory to look for socket files for unix:// urls
	SocketDir string

	// Path is the URL path, if the server's handler is at the mux path (e.g. /events)
	Path string
}

Options contain client options

Jump to

Keyboard shortcuts

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