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

Function ExampleClient_TxPipelined

example_test.go:442–451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

440}
441
442func ExampleClient_TxPipelined() {
443 var incr *redis.IntCmd
444 _, err := rdb.TxPipelined(ctx, func(pipe redis.Pipeliner) error {
445 incr = pipe.Incr(ctx, "tx_pipelined_counter")
446 pipe.Expire(ctx, "tx_pipelined_counter", time.Hour)
447 return nil
448 })
449 fmt.Println(incr.Val(), err)
450 // Output: 1 <nil>
451}
452
453func ExampleClient_TxPipeline() {
454 pipe := rdb.TxPipeline()

Callers

nothing calls this directly

Calls 4

ValMethod · 0.95
TxPipelinedMethod · 0.65
IncrMethod · 0.65
ExpireMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…