You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 3 седмици
преди 3 седмици
преди 3 седмици
1234567891011121314151617181920
  1. package mq
  2. import (
  3. "egg-im/pkg/db"
  4. "egg-im/pkg/gerrors"
  5. )
  6. const (
  7. PushRoomTopic = "push_room_topic" // 房间消息队列
  8. PushRoomPriorityTopic = "push_room_priority_topic" // 房间优先级消息队列
  9. PushAllTopic = "push_all_topic" // 全服消息队列
  10. )
  11. func Publish(topic string, bytes []byte) error {
  12. _, err := db.RedisCli.Publish(topic, bytes).Result()
  13. if err != nil {
  14. return gerrors.WrapError(err)
  15. }
  16. return nil
  17. }