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

Method _subscribe

pubsub.go:146–156  ·  view source on GitHub ↗
(
	ctx context.Context, cn *pool.Conn, redisCmd string, channels []string,
)

Source from the content-addressed store, hash-verified

144}
145
146func (c *PubSub) _subscribe(
147 ctx context.Context, cn *pool.Conn, redisCmd string, channels []string,
148) error {
149 args := make([]interface{}, 0, 1+len(channels))
150 args = append(args, redisCmd)
151 for _, channel := range channels {
152 args = append(args, channel)
153 }
154 cmd := NewSliceCmd(ctx, args...)
155 return c.writeCmd(ctx, cn, cmd)
156}
157
158func (c *PubSub) releaseConnWithLock(
159 ctx context.Context,

Callers 2

resubscribeMethod · 0.95
subscribeMethod · 0.95

Calls 2

writeCmdMethod · 0.95
NewSliceCmdFunction · 0.85

Tested by

no test coverage detected