mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
update PubSub.Channel documentation (#2761)
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
This commit is contained in:
@ -487,11 +487,11 @@ func (c *PubSub) getContext() context.Context {
|
|||||||
|
|
||||||
// Channel returns a Go channel for concurrently receiving messages.
|
// Channel returns a Go channel for concurrently receiving messages.
|
||||||
// The channel is closed together with the PubSub. If the Go channel
|
// The channel is closed together with the PubSub. If the Go channel
|
||||||
// is blocked full for 30 seconds the message is dropped.
|
// is blocked full for 1 minute the message is dropped.
|
||||||
// Receive* APIs can not be used after channel is created.
|
// Receive* APIs can not be used after channel is created.
|
||||||
//
|
//
|
||||||
// go-redis periodically sends ping messages to test connection health
|
// go-redis periodically sends ping messages to test connection health
|
||||||
// and re-subscribes if ping can not not received for 30 seconds.
|
// and re-subscribes if ping can not not received for 1 minute.
|
||||||
func (c *PubSub) Channel(opts ...ChannelOption) <-chan *Message {
|
func (c *PubSub) Channel(opts ...ChannelOption) <-chan *Message {
|
||||||
c.chOnce.Do(func() {
|
c.chOnce.Do(func() {
|
||||||
c.msgCh = newChannel(c, opts...)
|
c.msgCh = newChannel(c, opts...)
|
||||||
|
Reference in New Issue
Block a user