nsq

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

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

func NewConsumer

func NewConsumer(connection string) *Consumer

创建nsq消费者

func (*Consumer) Consumer

func (nc *Consumer) Consumer(topic string, channel string, thread int, handler func(message []byte) error) error

func (*Consumer) Stop

func (nc *Consumer) Stop()

type Producer

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

func NewProducer

func NewProducer(connection string) *Producer

创建nsq生产者

func (*Producer) Publish

func (p *Producer) Publish(topic string, message []byte) error

func (*Producer) Stop

func (p *Producer) Stop()

Jump to

Keyboard shortcuts

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