()
| 451 | } |
| 452 | |
| 453 | func ExampleClient_TxPipeline() { |
| 454 | pipe := rdb.TxPipeline() |
| 455 | |
| 456 | incr := pipe.Incr(ctx, "tx_pipeline_counter") |
| 457 | pipe.Expire(ctx, "tx_pipeline_counter", time.Hour) |
| 458 | |
| 459 | // Execute |
| 460 | // |
| 461 | // MULTI |
| 462 | // INCR pipeline_counter |
| 463 | // EXPIRE pipeline_counts 3600 |
| 464 | // EXEC |
| 465 | // |
| 466 | // using one rdb-server roundtrip. |
| 467 | _, err := pipe.Exec(ctx) |
| 468 | fmt.Println(incr.Val(), err) |
| 469 | // Output: 1 <nil> |
| 470 | } |
| 471 | |
| 472 | func ExampleClient_Watch() { |
| 473 | const maxRetries = 10000 |
nothing calls this directly
no test coverage detected
searching dependent graphs…