mq

package
v0.0.0-...-63a9e4b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_CAST         = mqe.IM_EVENT_CAST     // IM事件总线,广播方式
	DEFAULT_BUS          = mqe.IM_EVENT_BUS      // IM事件总线,非广播方式
	DEFAULT_BUS_WEBHOOKS = mqe.IM_HOOK_EVENT_BUS // IM事件总线,WebHooks专用
	DEFAULT_BUS_APPS     = "im_app_event_bus"    //
	DEFAULT_BUS_USERS    = "im_user_event_bus"   //
	DEFAULT_BUS_MSGS     = "im_msg_event_bus"    //

	DEFAULT_EBEX_CAST         = "fx.ex.event_cast"
	DEFAULT_EBEX              = "fx.ex.event_bus"      // 单消息发送
	DEFAULT_EBQ               = "fx.q.event_bus"       // 单消息发送
	DEFAULT_EBQ_HOOKS         = "fx.q.event_bus.hooks" // 单消息发送
	DEFAULT_EBQ_APPS          = "fx.q.event_bus.apps"  // 单消息发送
	DEFAULT_QUEUE_FOR_APPS    = "fx.q.ebq.apps"        // 广播消息监听
	DEFAULT_QUEUE_FOR_FILTERS = "fx.q.ebq.filters"     // 广播消息监听
	DEFAULT_QUEUE_FOR_HOOKS   = "fx.q.ebq.hooks"       // 广播消息监听

	DEFAULT_ROUTING_KEY = "fx.default.routing"

	MIME_JSON = "application/json"
	MIME_TEXT = "text/plain"
)

Variables

This section is empty.

Functions

func FanoutEvent

func FanoutEvent(ev v10.GlobalEvents, msg interface{})

func FanoutEventBytes

func FanoutEventBytes(msg []byte)

func HandleEvent

func HandleEvent(consumerName, queueName, busName string, onRecv func(d amqp.Delivery))

func Notify

func Notify(ev v10.GlobalEvents, msg interface{})

func Publish

func Publish(routingKey, contentType string, msg []byte)

func PublishText

func PublishText(routingKey string, msg string)

func RaiseEvent

func RaiseEvent(ev v10.GlobalEvents, msg interface{})

func Start

func Start(stopCh chan struct{})

func Stop

func Stop()

Types

This section is empty.

Jump to

Keyboard shortcuts

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