redis

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(address string, options Options, master bool) (client redis.Cmdable, closeFunc func() error)

Create creates a Redis connection.

Types

type Options

type Options struct {
	Sentinel        bool          `mapstructure:"sentinel"`
	MasterName      string        `mapstructure:"master-name"`
	Password        string        `mapstructure:"password"`
	PoolSize        int           `mapstructure:"pool-size"`
	MinIdleConns    int           `mapstructure:"min-idle-conns"`
	DialTimeout     time.Duration `mapstructure:"dial-timeout"`
	ReadTimeout     time.Duration `mapstructure:"read-timeout"`
	WriteTimeout    time.Duration `mapstructure:"write-timeout"`
	PoolTimeout     time.Duration `mapstructure:"pool-timeout"`
	IdleTimeout     time.Duration `mapstructure:"idle-timeout"`
	MaxRetries      int           `mapstructure:"max-retries"`
	MinRetryBackoff time.Duration `mapstructure:"min-retry-backoff"`
	MaxRetryBackoff time.Duration `mapstructure:"max-retry-backoff"`
}

Options represents a struct for creating Redis connection configurations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL