Skip to content

Commit 59798f9

Browse files
committed
chore: cleanup
1 parent 6f7f800 commit 59798f9

File tree

3 files changed

+123
-129
lines changed

3 files changed

+123
-129
lines changed

export_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ func GetSlavesAddrByName(ctx context.Context, c *SentinelClient, name string) []
9494
return parseReplicaAddrs(addrs, false)
9595
}
9696

97-
func (c *Ring) GetAddr(addr string) *ringShard {
98-
return c.shards.GetAddr(addr)
97+
func (c *Ring) ShardByName(name string) *ringShard {
98+
return c.sharding.ShardByName(name)
9999
}
100100

101-
func (c *ringShards) GetAddr(addr string) *ringShard {
102-
return c.shards[addr]
101+
func (c *ringSharding) ShardByName(name string) *ringShard {
102+
return c.shards.m[name]
103103
}

0 commit comments

Comments
 (0)