MCPcopy
hub / github.com/redis/go-redis / TxPipeline

Method TxPipeline

osscluster.go:1820–1829  ·  view source on GitHub ↗

TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.

()

Source from the content-addressed store, hash-verified

1818
1819// TxPipeline acts like Pipeline, but wraps queued commands with MULTI/EXEC.
1820func (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
1831func (c *ClusterClient) TxPipelined(ctx context.Context, fn func(Pipeliner) error) ([]Cmder, error) {
1832 return c.TxPipeline().Pipelined(ctx, fn)

Callers 1

TxPipelinedMethod · 0.95

Calls 3

initMethod · 0.95
wrapMultiExecFunction · 0.85
processTxPipelineHookMethod · 0.80

Tested by

no test coverage detected