Documentation
¶
Index ¶
- Constants
- func ClearChanBuffer(ch chan struct{}, duration time.Duration)
- func CloseClient(c *MqClient)
- type Bus
- type ExchangeDeclare
- type MqBase
- type MqClient
- func (s *MqClient) AckFor(msg amqp.Delivery, multiple bool) (err error)
- func (s *MqClient) Close()
- func (s *MqClient) CloseAll()
- func (s *MqClient) DropAll()
- func (s *MqClient) EnableReconnectLoop()
- func (s *MqClient) NewConsumer(consumerName, busName string, onRecv func(d amqp.Delivery)) *MqClient
- func (s *MqClient) NewConsumerWith(consumerName, queueName, busName string, autoAck bool, exclusive bool, ...) *MqClient
- func (s *MqClient) NewConsumerWithQueueName(consumerName, queueName, busName string, onRecv func(d amqp.Delivery)) *MqClient
- func (s *MqClient) Open(runLooper func()) (err error)
- func (s *MqClient) SetAndEnableReconnectLoop(fn func())
- func (s *MqClient) WithExitSignal(chExit chan struct{}) *MqClient
- type MqHub
- func (s *MqHub) AckFor(msg amqp.Delivery, multiple bool) (err error)
- func (s *MqHub) Close()
- func (s *MqHub) CloseAll()
- func (s *MqHub) DropAll()
- func (s *MqHub) EnableReconnectLoop()
- func (s *MqHub) Open(runLooper func()) (err error)
- func (s *MqHub) Publish(msg []byte, busName, routingKey, contentType string)
- func (s *MqHub) PublishX(msg []byte, busName, routingKey, contentType string, mandatory, immediate bool)
- func (s *MqHub) SetAndEnableReconnectLoop(fn func())
- func (s *MqHub) WithDebug(debug bool, busName string) *MqHub
- func (s *MqHub) WithExitSignal(chExit chan struct{}) *MqHub
- type Publishes
- type QueueBind
- type QueueDeclare
- type Table
Constants ¶
View Source
const ( IM_EVENT_BUS = "im_event_bus" // IM 标准事件总线,未单列的全局事件一律走此交换机; 单列的则独立配置交换机; IM_EVENT_CAST = "im_event_cast" // 广播事件 IM_HOOK_EVENT_BUS = "im_hook_event_bus" // webhooks' eventBus )
Variables ¶
This section is empty.
Functions ¶
func ClearChanBuffer ¶
Types ¶
type Bus ¶
type Bus struct { Exchange ExchangeDeclare Queue QueueDeclare Bind QueueBind }
type ExchangeDeclare ¶
type MqClient ¶
type MqClient struct { MqBase // contains filtered or unexported fields }
func (*MqClient) CloseAll ¶
func (s *MqClient) CloseAll()
close all resources and reconnect looper by `mqe.StartPublisherDaemon()`, `mqe.NewClient()`, `MqHub.Open()`, `MqClient.Open()`
func (*MqClient) EnableReconnectLoop ¶
func (s *MqClient) EnableReconnectLoop()
func (*MqClient) NewConsumer ¶
func (*MqClient) NewConsumerWith ¶
func (*MqClient) NewConsumerWithQueueName ¶
func (*MqClient) SetAndEnableReconnectLoop ¶
func (s *MqClient) SetAndEnableReconnectLoop(fn func())
func (*MqClient) WithExitSignal ¶
type MqHub ¶
type MqHub struct { MqBase // contains filtered or unexported fields }
func StartPublisherDaemon ¶
func StartPublisherDaemon(chExitGlobal chan struct{}) *MqHub
starts the daemon for producer/publisher
func (*MqHub) CloseAll ¶
func (s *MqHub) CloseAll()
close all resources and reconnect looper by `mqe.StartPublisherDaemon()`, `mqe.NewClient()`, `MqHub.Open()`, `MqClient.Open()`
func (*MqHub) EnableReconnectLoop ¶
func (s *MqHub) EnableReconnectLoop()
func (*MqHub) SetAndEnableReconnectLoop ¶
func (s *MqHub) SetAndEnableReconnectLoop(fn func())
func (*MqHub) WithExitSignal ¶
type QueueDeclare ¶
Click to show internal directories.
Click to hide internal directories.