redis

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HostFieldName           = "cache.redis.host"
	PortFieldName           = "cache.redis.port"
	UserFieldName           = "cache.redis.auth.user"
	PasswordFieldName       = "cache.redis.auth.password"
	ReadTimeoutFieldName    = "cache.redis.timeout.read"
	WriteTimeoutFieldName   = "cache.redis.timeout.write"
	ConnectTimeoutFieldName = "cache.redis.timeout.connect"

	HostDefault           = "localhost"
	PortDefault           = uint(6379)
	ReadTimeoutDefault    = 300 * time.Millisecond
	WriteTimeoutDefault   = 300 * time.Millisecond
	ConnectTimeoutDefault = 500 * time.Millisecond
)

Variables

This section is empty.

Functions

func NewRedis

func NewRedis(config *Config, informer log.Informer) redis.Cmdable

func WithConfigurator

func WithConfigurator(configurator configurator.Configurator, config *Config, informer log.Informer) redis.Cmdable

Types

type Config

type Config struct {
	Host string
	Port uint

	User     string
	Password string

	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	ConnectTimeout time.Duration
}

func Configuration

func Configuration(config *Config, configurator configurator.Configurator) *Config

func NewConfig

func NewConfig() *Config

Jump to

Keyboard shortcuts

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