redis

package
Version: v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package redis defines redis-specific configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `env:"REDIS_HOST, default=127.0.0.1"`
	Port     string `env:"REDIS_PORT, default=6379"`
	Username string `env:"REDIS_USERNAME"`
	Password string `env:"REDIS_PASSWORD"`

	IdleTimeout time.Duration `env:"REDIS_IDLE_TIMEOUT, default=1m"`
	MaxIdle     int           `env:"REDIS_MAX_IDLE, default=16"`
	MaxActive   int           `env:"REDIS_MAX_ACTIVE, default=64"`

	// WaitTimeout is the maximum amount of time to wait for a connection to
	// become available.
	WaitTimeout time.Duration `env:"REDIS_WAIT_TIMEOUT, default=1s"`
}

Config defines the default redis configuration and env processing.

Source Files

Jump to

Keyboard shortcuts

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