Skip to content

Commit 965ecde

Browse files
authored
Merge pull request #2190 from go-redis/feat/set-addrs
Feat/set addrs
2 parents 2bcb060 + 20ba6d5 commit 965ecde

File tree

3 files changed

+199
-70
lines changed

3 files changed

+199
-70
lines changed

export_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,11 @@ func GetSlavesAddrByName(ctx context.Context, c *SentinelClient, name string) []
9393
}
9494
return parseReplicaAddrs(addrs, false)
9595
}
96+
97+
func (c *Ring) ShardByName(name string) *ringShard {
98+
return c.sharding.ShardByName(name)
99+
}
100+
101+
func (c *ringSharding) ShardByName(name string) *ringShard {
102+
return c.shards.m[name]
103+
}

0 commit comments

Comments
 (0)