redis

package
v0.0.0-...-2215086 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPool

func NewPool(config Config) *redis.Pool

NewPool creates a new redis connection pool.

Types

type Config

type Config struct {
	// Host is the Redis host.
	Host string

	// Port is the Redis port.
	Port int

	// Password list supports passing multiple passwords making password changes easier
	Password []string

	Enabled bool
}

Config holds information necessary for connecting to Redis.

func (Config) Server

func (c Config) Server() string

Server returns the host-port pair for the connection.

func (Config) Validate

func (c Config) Validate() error

Validate checks that the configuration is valid.

type PoolWrapper

type PoolWrapper struct {
	*redis.Pool
}

Jump to

Keyboard shortcuts

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