Documentation ¶
Index ¶
- Variables
- func NewMQ() mq.IReactMQ
- type RedisMQ
- func (this *RedisMQ) Close()
- func (this *RedisMQ) Connect(mode mq.Mode, strURL string) (err error)
- func (this *RedisMQ) Consume(strBindingKey, strQueueName string, handler mq.ReactHandler) (err error)
- func (this *RedisMQ) Debug(enable bool)
- func (this *RedisMQ) GetAdapter() (adapter mq.Adapter)
- func (this *RedisMQ) IsClosed() bool
- func (this *RedisMQ) Publish(strBindingKey, strQueueName, key string, value 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, handler mq.ReactHandler) (err error)
* @brief 消息消费接口定义 * @param strBindingKey 队列绑定Key * @param strQueueName 队列名称 * @param handler 消费回调处理对象 * @return err 成功返回nil,失败返回返回具体错误信息 * @remark 服务器异常或重启时内部会自动重连服务器
func (*RedisMQ) GetAdapter ¶ added in v1.0.9
* @brief 获取当前MQ类型 * @param adapter MQ类型
Click to show internal directories.
Click to hide internal directories.