TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
()
| 1527 | |
| 1528 | // TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. |
| 1529 | func (c *Client) TxPipeline() Pipeliner { |
| 1530 | pipe := Pipeline{ |
| 1531 | exec: func(ctx context.Context, cmds []Cmder) error { |
| 1532 | cmds = wrapMultiExec(ctx, cmds) |
| 1533 | return c.processTxPipelineHook(ctx, cmds) |
| 1534 | }, |
| 1535 | } |
| 1536 | pipe.init() |
| 1537 | return &pipe |
| 1538 | } |
| 1539 | |
| 1540 | func (c *Client) pubSub() *PubSub { |
| 1541 | pubsub := &PubSub{ |