TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
()
| 1818 | |
| 1819 | // TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC. |
| 1820 | func (c *ClusterClient) TxPipeline() Pipeliner { |
| 1821 | pipe := Pipeline{ |
| 1822 | exec: func(ctx context.Context, cmds []Cmder) error { |
| 1823 | cmds = wrapMultiExec(ctx, cmds) |
| 1824 | return c.processTxPipelineHook(ctx, cmds) |
| 1825 | }, |
| 1826 | } |
| 1827 | pipe.init() |
| 1828 | return &pipe |
| 1829 | } |
| 1830 | |
| 1831 | func (c *ClusterClient) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) { |
| 1832 | return c.TxPipeline().Pipelined(ctx, fn) |
no test coverage detected