etcd

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMQ

func NewMQ() mq.IReactMQ

Types

type EtcdMQ

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

func (*EtcdMQ) Connect

func (this *EtcdMQ) Connect(mode mq.Mode, strURL string) (err error)

func (*EtcdMQ) Consume

func (this *EtcdMQ) Consume(strBindingKey, strQueueName string, cb mq.FnConsumeCb) (err error)

func (*EtcdMQ) Debug

func (this *EtcdMQ) Debug(enable bool)

* @brief 开启或关闭调式模式 * @param enable true开启/false关闭

func (*EtcdMQ) IsClosed

func (this *EtcdMQ) IsClosed() bool

判定是否服务器重启断开客户端连接

func (*EtcdMQ) Publish

func (this *EtcdMQ) Publish(strRoutingKey, strData string) (err error)

func (*EtcdMQ) Reconnect

func (this *EtcdMQ) Reconnect() (err error)

当调用Publish返回错误并且IsClosed()返回true时,可调用此方法发起重连

Jump to

Keyboard shortcuts

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