1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-12 14:21:52 +03:00

Move Select to stateful commands and make it available only via Pipeline and Tx.

This commit is contained in:
Vladimir Mihailenco
2016-06-05 09:45:39 +00:00
parent 5a2dda6d40
commit ac162eb843
13 changed files with 481 additions and 485 deletions

View File

@ -11,7 +11,8 @@ import (
// http://redis.io/topics/pipelining. It's safe for concurrent use
// by multiple goroutines.
type Pipeline struct {
commandable
cmdable
statefulCmdable
exec func([]Cmder) error
@ -21,7 +22,7 @@ type Pipeline struct {
closed int32
}
func (pipe *Pipeline) process(cmd Cmder) {
func (pipe *Pipeline) Process(cmd Cmder) {
pipe.mu.Lock()
pipe.cmds = append(pipe.cmds, cmd)
pipe.mu.Unlock()