nsq

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT Imports: 6 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(topic, channel string) *Consumer

初始化消费端

func (*Consumer) Set

func (c *Consumer) Set(option string, value interface{})

func (*Consumer) SetLogger

func (c *Consumer) SetLogger(log logger, level nsq.LogLevel)

func (*Consumer) SetMap

func (c *Consumer) SetMap(options map[string]interface{})

func (*Consumer) Start

func (c *Consumer) Start(handler nsq.Handler) error

func (*Consumer) Stop

func (c *Consumer) Stop() error

stop and wait

type Producer

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

func NewNsqProducer

func NewNsqProducer(addrs []string) *Producer

func (*Producer) PubMsg

func (p *Producer) PubMsg(topic string, msg interface{}) error

Jump to

Keyboard shortcuts

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