Skip to content

Commit 5fec7c2

Browse files
committed
coding...
1 parent 922c601 commit 5fec7c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

goredis_proxy/options.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ func (o *Options) Addr() string {
2828
return fmt.Sprintf("%s:%d", o.Host, o.Port)
2929
}
3030

31-
// 是否允许写主库
31+
// 包含w表示可写入
3232
func (o *Options) CanWrite() bool {
3333
return strings.Contains(o.Mode, "w")
3434
}
3535

36+
// 包容rr表示主从均可以读
3637
func (o *Options) CanReadMaster() bool {
3738
return strings.Contains(o.Mode, "rr")
3839
}

0 commit comments

Comments
 (0)