1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Clarify thread safety. Fixes #166.

This commit is contained in:
Vladimir Mihailenco
2015-09-12 09:36:03 +03:00
parent 02154c3b3a
commit c809246d8b
8 changed files with 33 additions and 16 deletions

View File

@ -54,8 +54,9 @@ func (opt *FailoverOptions) options() *Options {
}
}
// NewFailoverClient returns a Redis client with automatic failover
// capabilities using Redis Sentinel.
// NewFailoverClient returns a Redis client that uses Redis Sentinel
// for automatic failover. It's safe for concurrent use by multiple
// goroutines.
func NewFailoverClient(failoverOpt *FailoverOptions) *Client {
opt := failoverOpt.options()
failover := &sentinelFailover{