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

Function ExampleNewUniversalClient_failover

example_test.go:662–670  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

660}
661
662func ExampleNewUniversalClient_failover() {
663 rdb := redis.NewUniversalClient(&redis.UniversalOptions{
664 MasterName: "master",
665 Addrs: []string{":26379"},
666 })
667 defer rdb.Close()
668
669 rdb.Ping(ctx)
670}
671
672func ExampleNewUniversalClient_cluster() {
673 rdb := redis.NewUniversalClient(&redis.UniversalOptions{

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.95
PingMethod · 0.65

Tested by

no test coverage detected