utils

package
v0.0.0-...-fcb1709 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 6 Imported by: 29

Documentation

Index

Constants

MonitorEvents is a bit mask of ZMQ events to listen to

Variables

This section is empty.

Functions

func AssertError

func AssertError(err error)

AssertError prints given error message if err is not nil & exist with status code 1

func CreateInputPort

func CreateInputPort(name string, endpoint string, monitCh chan<- bool) (socket *zmq.Socket, err error)

CreateInputPort creates a ZMQ PULL socket & bind to a given endpoint

func CreateOutputPort

func CreateOutputPort(name string, endpoint string, monitCh chan<- bool) (socket *zmq.Socket, err error)

CreateOutputPort creates a ZMQ PUSH socket & connect to a given endpoint

func MonitorSocket

func MonitorSocket(socket *zmq.Socket, name string) (<-chan zmq.Event, error)

MonitorSocket creates a monitoring socket using given context and connects to a given socket to be monitored. Returns a channel to receive monitoring events. See event definitions here: http://api.zeromq.org/3-2:zmq-socket-monitor

Types

This section is empty.

Jump to

Keyboard shortcuts

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