mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
pipeline now has its own interface "Pipelineable"
This commit is contained in:
4
tx.go
4
tx.go
@ -76,7 +76,7 @@ func (c *Tx) Unwatch(keys ...string) *StatusCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *Tx) Pipeline() *Pipeline {
|
||||
func (c *Tx) Pipeline() Pipelineable {
|
||||
pipe := Pipeline{
|
||||
exec: c.pipelineExecer(c.txPipelineProcessCmds),
|
||||
}
|
||||
@ -94,6 +94,6 @@ func (c *Tx) Pipeline() *Pipeline {
|
||||
// Exec always returns list of commands. If transaction fails
|
||||
// TxFailedErr is returned. Otherwise Exec returns error of the first
|
||||
// failed command or nil.
|
||||
func (c *Tx) Pipelined(fn func(*Pipeline) error) ([]Cmder, error) {
|
||||
func (c *Tx) Pipelined(fn func(Pipelineable) error) ([]Cmder, error) {
|
||||
return c.Pipeline().pipelined(fn)
|
||||
}
|
||||
|
Reference in New Issue
Block a user