mq

package
v0.0.0-...-d050cfb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nats

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

Nats nats struct

func NewNats

func NewNats(logger *zap.Logger) *Nats

NewNats return new nats

func (*Nats) Close

func (n *Nats) Close() error

Close close nats

func (*Nats) Publish

func (n *Nats) Publish(topic string, data []byte) error

Publish 发布

func (*Nats) QueueSubscribe

func (n *Nats) QueueSubscribe(topic, queue string, handler func(msg *nats.Msg)) error

QueueSubscribe ....

func (*Nats) Start

func (n *Nats) Start(addrs []string) error

Start init && start nats

func (*Nats) Subscribe

func (n *Nats) Subscribe(topic string, handler func(msg *nats.Msg)) error

Subscribe ....

Jump to

Keyboard shortcuts

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