ChannelWithSubscriptions is like Channel, but message type can be either *Subscription or *Message. Subscription messages can be used to detect reconnections. ChannelWithSubscriptions can not be used together with Channel or ChannelSize.
(opts ...ChannelOption)
| 595 | // |
| 596 | // ChannelWithSubscriptions can not be used together with Channel or ChannelSize. |
| 597 | func (c *PubSub) ChannelWithSubscriptions(opts ...ChannelOption) <-chan interface{} { |
| 598 | c.chOnce.Do(func() { |
| 599 | c.allCh = newChannel(c, opts...) |
| 600 | c.allCh.initAllChan() |
| 601 | }) |
| 602 | if c.allCh == nil { |
| 603 | err := fmt.Errorf("redis: ChannelWithSubscriptions can't be called after Channel") |
| 604 | panic(err) |
| 605 | } |
| 606 | return c.allCh.allCh |
| 607 | } |
| 608 | |
| 609 | func (c *PubSub) processPendingPushNotificationWithReader(ctx context.Context, cn *pool.Conn, rd *proto.Reader) error { |
| 610 | // Only process push notifications for RESP3 connections with a processor |
nothing calls this directly
no test coverage detected