Documentation ¶
Index ¶
- Constants
- func NewClusterRedis(opts ...Option) (*redis.ClusterClient, error)
- func NewFailoverRedis(opts ...Option) (*redis.Client, error)
- func NewRedis(address []string, opts ...Option) (redis.UniversalClient, error)
- func NewRedisWithOptions(o *Options) (redis.UniversalClient, error)
- func NewRingRedis(opts ...Option) (*redis.Ring, error)
- func NewSimpleRedis(opts ...Option) (*redis.Client, error)
- type Option
- func ClientType(clientType string) Option
- func Context(ctx context.Context) Option
- func DB(db int) Option
- func DialTimeout(timeout time.Duration) Option
- func MasterName(masterName string) Option
- func MaxRetries(maxRetries int) Option
- func MaxRetryBackoff(maxRetryBackoff time.Duration) Option
- func MinRetryBackoff(minRetryBackoff time.Duration) Option
- func Password(pwd string) Option
- func PoolSize(size int) Option
- func ReadTimeout(timeout time.Duration) Option
- func Shards(shards []string) Option
- func Username(username string) Option
- func WriteTimeout(timeout time.Duration) Option
- type Options
Constants ¶
View Source
const ( Simple = "simple" Failover = "failover" Cluster = "cluster" Ring = "ring" )
Variables ¶
This section is empty.
Functions ¶
func NewClusterRedis ¶
func NewFailoverRedis ¶
func NewRedisWithOptions ¶
func NewRingRedis ¶
func NewSimpleRedis ¶
Types ¶
type Option ¶
type Option func(*Options)
func ClientType ¶
func DialTimeout ¶
func MasterName ¶
func MaxRetries ¶
func MaxRetryBackoff ¶
func MinRetryBackoff ¶
func ReadTimeout ¶
func WriteTimeout ¶
Click to show internal directories.
Click to hide internal directories.