xqueuensq

package
v0.3.28 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: BSD-3-Clause-Clear Imports: 3 Imported by: 0

Documentation

Overview

NSQ驱动xqueue队列

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(get, gettopic, getchannel, set, settopic string, max_error uint16) xqueue.Queue

获取NSQ的xqueue驱动

get			监听队列端口
gettopic	监听队列的通道
getchannel	监听队列的客户端
set			发送队列的端口
settopic	发送队列的通道
max_error	最大错误重试次数

Types

type Queues

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

func (*Queues) HandleMessage

func (c *Queues) HandleMessage(m *nsq.Message) error

队列消息监听

func (*Queues) Listen

func (c *Queues) Listen(f func(dat []byte) error) error

队列监听

func (*Queues) Set

func (c *Queues) Set(dat []byte) error

设置队列监听

func (*Queues) SetDef

func (c *Queues) SetDef(dat []byte, t time.Duration) error

设置延时队列监听

Jump to

Keyboard shortcuts

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