Documentation ¶
Index ¶
- Constants
- func NewMQ() mq.IReactMQ
- type EtcdMQ
- func (this *EtcdMQ) Close()
- func (this *EtcdMQ) Connect(mode mq.Mode, strURL string) (err error)
- func (this *EtcdMQ) Consume(strBindingKey, strQueueName string, handler mq.ReactHandler) (err error)
- func (this *EtcdMQ) Debug(enable bool)
- func (this *EtcdMQ) GetAdapter() (adapter mq.Adapter)
- func (this *EtcdMQ) IsClosed() bool
- func (this *EtcdMQ) Publish(strBindingKey, strQueueName, key string, value string) (err error)
- func (this *EtcdMQ) Reconnect() (err error)
Constants ¶
View Source
const (
ETCD_SCHEMA_PRIFIX = "etcd://"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EtcdMQ ¶
type EtcdMQ struct {
// contains filtered or unexported fields
}
func (*EtcdMQ) Connect ¶
strUrl格式 单机"etcd://127.0.0.1:2379" 集群 "etcd://127.0.0.1:2379,127.0.0.1:2479,..."
func (*EtcdMQ) Consume ¶
func (this *EtcdMQ) Consume(strBindingKey, strQueueName string, handler mq.ReactHandler) (err error)
* @brief 消息消费接口定义 * @param strBindingKey 队列绑定Key * @param strQueueName 队列名称 * @param handler 消费回调处理对象 * @return err 成功返回nil,失败返回返回具体错误信息 * @remark 服务器异常或重启时内部会自动重连服务器
func (*EtcdMQ) GetAdapter ¶ added in v1.0.9
* @brief 获取当前MQ类型 * @param adapter MQ类型
Click to show internal directories.
Click to hide internal directories.