Documentation ¶ Index ¶ type Consumer func NewConsumer(connection string) *Consumer func (nc *Consumer) Consumer(topic string, channel string, thread int, handler func(message []byte) error) error func (nc *Consumer) Stop() type Producer func NewProducer(connection string) *Producer func (p *Producer) Publish(topic string, message []byte) error func (p *Producer) Stop() 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() Source Files ¶ View all Source files nsq.go Click to show internal directories. Click to hide internal directories.