Documentation
¶
Index ¶
Constants ¶
View Source
const (
APP_NAME = "bus"
)
View Source
const (
APP_PRIORITY = 595
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler func(*Event)
type Service ¶
type Service interface { Publisher SubScriber }
func GetService ¶
func GetService() Service
type SubScriber ¶
type SubScriber interface { // 主题订阅, 应用的多个实例 都会收到一份消息(广播) TopicSubscribe(ctx context.Context, subject string, cb EventHandler) error // 队列订阅, 默认应用名称为队列名称, 同一个队列中 只能收到一份消息 QueueSubscribe(ctx context.Context, subject string, cb EventHandler) error }
Click to show internal directories.
Click to hide internal directories.