nsq

package
v0.0.0-...-eb64f0e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Events

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

Events is a abstraction of a basic event bus.

func NewEvents

func NewEvents(nsq string, topic string) (ev *Events, err error)

NewEvents creates a new event bus.

func (*Events) Close

func (ev *Events) Close()

Close the event.

func (*Events) CreateConsumer

func (ev *Events) CreateConsumer(ch string, handler gnsq.Handler) error

CreateConsumer creates a new consumer.

func (*Events) CreateProducer

func (ev *Events) CreateProducer() error

CreateProducer creates a producer.

func (*Events) Publish

func (ev *Events) Publish(message []byte) error

Publish a message.

func (*Events) Set

func (ev *Events) Set(key string, value interface{}) error

Set wraps the Config.Set method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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