redis

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

redis

Go Reference

A package to add flags related to redis to cobra.

Documentation

Index

Constants

View Source
const DefaultIdleTimeout = 1 * time.Second

DefaultIdleTimeout is the default used for the idle timeout parameter.

View Source
const EnvAddr = "REDIS_ADDR"
View Source
const EnvDB = "REDIS_DB"
View Source
const EnvIdleTimeout = "REDIS_IDLE_TIMEOUT"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr        string
	DB          int
	IdleTimeout time.Duration
}

func NewConfig

func NewConfig(cmd *cobra.Command) *Config

func (*Config) Pool

func (cfg *Config) Pool() *redis.Pool

Pool gets the Pool.

Jump to

Keyboard shortcuts

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