ing
This commit is contained in:
parent
20ad490e27
commit
9a532bb137
|
@ -75,7 +75,7 @@ func (s *subscribers) listenSubscriptions() {
|
|||
switch v := s.conn.Receive().(type) {
|
||||
case redis.Message:
|
||||
if h, ok := s.subHandlers[v.Channel]; ok {
|
||||
h.OnSubscribe(v.Channel, string(v.Data))
|
||||
h.OnSubscribe(v.Channel, v.Data)
|
||||
}
|
||||
break
|
||||
case redis.Subscription:
|
||||
|
|
|
@ -2,5 +2,5 @@ package overflow_subscriber
|
|||
|
||||
type SubscriberHandler interface {
|
||||
GetChannel() string
|
||||
OnSubscribe(channel string, payload string)
|
||||
OnSubscribe(channel string, payload []byte)
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ type SubscriberHandlers struct {
|
|||
func (h *SubscriberHandlers) GetChannel() string {
|
||||
return h.Channel
|
||||
}
|
||||
func (h *SubscriberHandlers) OnSubscribe(channel string, payload string) {
|
||||
func (h *SubscriberHandlers) OnSubscribe(channel string, payload []byte) {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user