zmq

package
v0.5.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PLUGIN = node.NewPlugin("ZMQ", node.Disabled, configure, run)
)
View Source
var (
	// RegisteredZMQTopics lists the available topics
	RegisteredZMQTopics = []string{
		topicLMI,
		topicLMSI,
		topicLMHS,
		topicLM,
		topicLSM,
		topicSN,
		topicTxTrytes,
		topicTX,
		topicSpentAddress,
	}
)

Functions

func GetAddressTopics

func GetAddressTopics() []string

GetAddressTopics returns subscribed addresses

Types

type AddressTopics

type AddressTopics struct {
	Addressses []string
	// contains filtered or unexported fields
}

AddressTopics stuct

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher is a simple zmq publisher abstraction

func NewPublisher

func NewPublisher() (*Publisher, error)

NewPublisher creates a new publisher.

func (*Publisher) Send

func (pub *Publisher) Send(topic string, messages []string) error

Send sends a new list of messages.

func (*Publisher) Shutdown

func (pub *Publisher) Shutdown() error

Shutdown stops the publisher.

func (*Publisher) Start

func (pub *Publisher) Start() error

Start the publisher on the given port.

type SpecialTopics

type SpecialTopics struct {
	Topics []string
}

SpecialTopics struct

func GetSpecialTopics

func GetSpecialTopics() *SpecialTopics

GetSpecialTopics is a sortet list of special topics (e.g. Addresses)

func (*SpecialTopics) AddressTopics

func (st *SpecialTopics) AddressTopics()

AddressTopics filters SpecialTopics for address topics

Jump to

Keyboard shortcuts

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