Documentation
¶
Index ¶
- Variables
- func NewMQ() mq.IReactMQ
- type RedisMQ
- func (this *RedisMQ) Connect(mode mq.Mode, strURL string) (err error)
- func (this *RedisMQ) Consume(strBindingKey, strQueueName string, cb mq.FnConsumeCb) (err error)
- func (this *RedisMQ) Debug(enable bool)
- func (this *RedisMQ) IsClosed() bool
- func (this *RedisMQ) Publish(strRoutingKey, strData string) (err error)
- func (this *RedisMQ) Reconnect() (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var REDIS_CMD_AUTH = "AUTH"
View Source
var REDIS_CMD_BRPOP = "BRPOP"
View Source
var REDIS_CMD_DEL = "DEL"
View Source
var REDIS_CMD_EVAL = "EVAL"
View Source
var REDIS_CMD_EXPIRE = "EXPIRE"
View Source
var REDIS_CMD_GET = "GET"
View Source
var REDIS_CMD_LPUSH = "LPUSH"
View Source
var REDIS_CMD_PING = "PING"
View Source
var REDIS_CMD_PSUBSCRIBE = "PSUBSCRIBE" //模式订阅(使用*作为通配符)
View Source
var REDIS_CMD_PUBLISH = "PUBLISH"
View Source
var REDIS_CMD_SET = "SET"
View Source
var REDIS_CMD_SUBSCRIBE = "SUBSCRIBE"
View Source
var REDIS_RESP_OK = "OK"
View Source
var REDIS_SET_EX = "EX"
View Source
var REDIS_SET_NX = "NX"
View Source
var REDIS_SET_WITH_EXPIRE_TIME = "PX"
Functions ¶
Types ¶
type RedisMQ ¶
type RedisMQ struct {
// contains filtered or unexported fields
}
func (*RedisMQ) Connect ¶
Redis连接URL 有密码 "redis://123456@192.168.1.10:6379"
没有密码则是 "redis://192.168.1.10:6379"
func (*RedisMQ) Consume ¶
func (this *RedisMQ) Consume(strBindingKey, strQueueName string, cb mq.FnConsumeCb) (err error)
Click to show internal directories.
Click to hide internal directories.