MCPcopy
hub / github.com/redis/go-redis / subscribe

Method subscribe

pubsub.go:334–343  ·  view source on GitHub ↗
(ctx context.Context, redisCmd string, channels ...string)

Source from the content-addressed store, hash-verified

332}
333
334func (c *PubSub) subscribe(ctx context.Context, redisCmd string, channels ...string) error {
335 cn, err := c.conn(ctx, channels)
336 if err != nil {
337 return err
338 }
339
340 err = c._subscribe(ctx, cn, redisCmd, channels)
341 c.releaseConn(ctx, cn, err, false)
342 return err
343}
344
345func (c *PubSub) Ping(ctx context.Context, payload ...string) error {
346 args := []interface{}{"ping"}

Callers 6

SubscribeMethod · 0.95
PSubscribeMethod · 0.95
SSubscribeMethod · 0.95
UnsubscribeMethod · 0.95
PUnsubscribeMethod · 0.95
SUnsubscribeMethod · 0.95

Calls 3

connMethod · 0.95
_subscribeMethod · 0.95
releaseConnMethod · 0.95

Tested by

no test coverage detected