diff options
Diffstat (limited to 'src/dma/vendor/github.com/go-redis/redis/pipeline.go')
-rw-r--r-- | src/dma/vendor/github.com/go-redis/redis/pipeline.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dma/vendor/github.com/go-redis/redis/pipeline.go b/src/dma/vendor/github.com/go-redis/redis/pipeline.go index ba852283..b3a8844a 100644 --- a/src/dma/vendor/github.com/go-redis/redis/pipeline.go +++ b/src/dma/vendor/github.com/go-redis/redis/pipeline.go @@ -10,6 +10,7 @@ type pipelineExecer func([]Cmder) error type Pipeliner interface { StatefulCmdable + Do(args ...interface{}) *Cmd Process(cmd Cmder) error Close() error Discard() error @@ -31,6 +32,12 @@ type Pipeline struct { closed bool } +func (c *Pipeline) Do(args ...interface{}) *Cmd { + cmd := NewCmd(args...) + _ = c.Process(cmd) + return cmd +} + // Process queues the cmd for later execution. func (c *Pipeline) Process(cmd Cmder) error { c.mu.Lock() |