gitee.com/h79/goutils@v1.22.10/common/bus/subscriber.go (about) 1 package bus 2 3 type EventChan chan Event 4 5 // Subscriber ch is func or chan.(EventChan) 6 type Subscriber interface { 7 SubscribeEventChan(topic string, ch EventChan) error 8 Subscribe(topic string, ch interface{}) error 9 SubscribeAsync(topic string, ch interface{}, transactional bool) error 10 SubscribeOnce(topic string, ch interface{}) error 11 SubscribeOnceAsync(topic string, ch interface{}) error 12 UnSubscribe(topic string, ch interface{}) 13 }