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

Method PSubscribe

redis.go:1607–1613  ·  view source on GitHub ↗

PSubscribe subscribes the client to the given patterns. Patterns can be omitted to create empty subscription.

(ctx context.Context, channels ...string)

Source from the content-addressed store, hash-verified

1605// PSubscribe subscribes the client to the given patterns.
1606// Patterns can be omitted to create empty subscription.
1607func (c *Client) PSubscribe(ctx context.Context, channels ...string) *PubSub {
1608 pubsub := c.pubSub()
1609 if len(channels) > 0 {
1610 _ = pubsub.PSubscribe(ctx, channels...)
1611 }
1612 return pubsub
1613}
1614
1615// SSubscribe Subscribes the client to the specified shard channels.
1616// Channels can be omitted to create empty subscription.

Callers

nothing calls this directly

Calls 2

pubSubMethod · 0.95
PSubscribeMethod · 0.65

Tested by

no test coverage detected