redis

package module
v0.0.0-...-fbaf9a3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	RedisAddr        = "redis-addr"
	RedisDB          = "redis-db"
	RedisClientName  = "redis-client-name"
	RedisUsername    = "redis-username"
	RedisPassword    = "redis-password"
	RedisURL         = "redis-url"
	RedisTLSCertFile = "redis-tls-cert-file"
	RedisTLSKeyFile  = "redis-tls-key-file"
	RedisTLSCAFile   = "redis-tls-ca-file"
)

Variables

View Source
var DefaultConfig = &Config{
	Addr:       "localhost:6379",
	DB:         0,
	ClientName: "",
	Username:   "",
	Password:   "",
	TLS: &TLS{
		CertFile: "",
		KeyFile:  "",
		CAFile:   "",
	},
}

Functions

func New

func New() (*redis.Client, error)

func NewTLS

func NewTLS(tlsConfig *tls.Config) (*redis.Client, error)

Types

type Config

type Config struct {
	Addr       string
	DB         int
	ClientName string
	Username   string
	Password   string
	URL        string
	TLS        *TLS
}

func (*Config) BindFlags

func (c *Config) BindFlags(fs *pflag.FlagSet)

type TLS

type TLS struct {
	CertFile string
	KeyFile  string
	CAFile   string
}

Jump to

Keyboard shortcuts

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