1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Review API.

This commit is contained in:
Vladimir Mihailenco
2012-08-17 21:36:48 +03:00
parent df1b8a3f5c
commit 11e1783560
10 changed files with 818 additions and 621 deletions

View File

@ -16,6 +16,16 @@ func (c *Client) PipelineClient() (*PipelineClient, error) {
}, nil
}
func (c *Client) Pipelined(do func(*PipelineClient)) ([]Req, error) {
pc, err := c.PipelineClient()
if err != nil {
return nil, err
}
defer pc.Close()
do(pc)
return pc.RunQueued()
}
func (c *PipelineClient) Close() error {
return nil
}