1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

pipeline now has its own interface "Pipelineable"

This commit is contained in:
Felipe Cavalcanti
2017-05-01 12:42:58 -03:00
parent 4c6e2ad9a0
commit 6fca4d5ad0
16 changed files with 70 additions and 42 deletions

View File

@ -381,7 +381,7 @@ func (c *Ring) Close() error {
return firstErr
}
func (c *Ring) Pipeline() *Pipeline {
func (c *Ring) Pipeline() Pipelineable {
pipe := Pipeline{
exec: c.pipelineExec,
}
@ -390,7 +390,7 @@ func (c *Ring) Pipeline() *Pipeline {
return &pipe
}
func (c *Ring) Pipelined(fn func(*Pipeline) error) ([]Cmder, error) {
func (c *Ring) Pipelined(fn func(Pipelineable) error) ([]Cmder, error) {
return c.Pipeline().pipelined(fn)
}