redis

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB() *redis.Client

func Init

func Init(cfg *Config) error

func NewDBRedis

func NewDBRedis(expiration int) dbRedis

Types

type Config

type Config struct {
	IdleSize int    `json:"idle_size"`
	NetWork  string `json:"network"`
	Address  string `json:"address"   required:"true"`
	Password string `json:"password"  required:"true"`
	KeyPair  string `json:"key_pair"  required:"true"`
	DB       int    `json:"db"`
	Timeout  int64  `json:"timeout"`
	DBCert   string `json:"db_cert"   required:"true"`
}

func (*Config) SetDefault

func (p *Config) SetDefault()

Jump to

Keyboard shortcuts

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