databus.go 396 B

1234567891011121314151617
  1. package dao
  2. import (
  3. "context"
  4. "strconv"
  5. "go-common/library/log"
  6. )
  7. // PubScoreChange pub spy score change msg into databus.
  8. func (d *Dao) PubScoreChange(c context.Context, mid int64, msg interface{}) (err error) {
  9. key := strconv.FormatInt(mid, 10)
  10. if err = d.dbScoreChange.Send(c, key, msg); err != nil {
  11. log.Error("d.dbScoreChange.Send(%s, %v) error (%v)", key, msg, err)
  12. }
  13. return
  14. }