tredis

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cache struct {
	// 设置
	Set *tredisSetting
	// redis连接
	Client *redis.Client
}

Functions

func DeleteRedis

func DeleteRedis(keys ...string) int64

删除

func GetRedis

func GetRedis(key string) string

func SetRedis

func SetRedis(key string, value string, validSeconds time.Duration) error

Types

type Trr

type Trr struct {
	// contains filtered or unexported fields
}

func (*Trr) Check

func (t *Trr) Check() error

func (*Trr) Get

func (t *Trr) Get(prefix string, key string) error

获取redis里的数据

func (*Trr) Interface

func (t *Trr) Interface() interface{}

func (*Trr) Save

func (t *Trr) Save(prefix string, key string, timeout time.Duration) error

保存到redis数据库

func (*Trr) SetValue

func (t *Trr) SetValue(v interface{}) error

Jump to

Keyboard shortcuts

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