1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Reduce number of various options structs. Slightly reword comments.

This commit is contained in:
Vladimir Mihailenco
2015-05-23 17:55:08 +03:00
parent f6ef0fd342
commit 40b429df49
5 changed files with 88 additions and 160 deletions

View File

@ -267,20 +267,28 @@ func (c *ClusterClient) reaper() {
//------------------------------------------------------------------------------
// ClusterOptions are used to configure a cluster client and should be
// passed to NewClusterClient.
type ClusterOptions struct {
// A seed-list of host:port addresses of known cluster nodes
// A seed list of host:port addresses of cluster nodes.
Addrs []string
// An optional password
Password string
// The maximum number of MOVED/ASK redirects to follow, before
// giving up. Default: 16
// The maximum number of MOVED/ASK redirects to follow before
// giving up.
// Default is 16
MaxRedirects int
// Following options are copied from `redis.Options`.
PoolSize int
DialTimeout, ReadTimeout, WriteTimeout, PoolTimeout, IdleTimeout time.Duration
// Following options are copied from Options struct.
Password string
DialTimeout time.Duration
ReadTimeout time.Duration
WriteTimeout time.Duration
PoolSize int
PoolTimeout time.Duration
IdleTimeout time.Duration
}
func (opt *ClusterOptions) getMaxRedirects() int {