redis

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: GPL-3.0, GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PoolMaxIdle = 10

Functions

func Exists

func Exists(key, itemKey string) bool

func Expire

func Expire(key string, seconds int) error

func Get

func Get(userKey, itemKey string) (interface{}, bool)

func GetBool

func GetBool(userKey, itemKey string) (bool, bool)

func GetBytes

func GetBytes(userKey, itemKey string) ([]byte, bool)

func GetFloat64

func GetFloat64(userKey, itemKey string) (float64, bool)

func GetInt

func GetInt(userKey, itemKey string) (int, bool)

func GetInt64

func GetInt64(userKey, itemKey string) (int64, bool)

func GetInt64Map

func GetInt64Map(userKey, itemKey string) (map[string]int64, bool)

func GetIntMap

func GetIntMap(userKey, itemKey string) (map[string]int, bool)

func GetInts

func GetInts(userKey, itemKey string) ([]int, bool)

func GetString

func GetString(userKey, itemKey string) (string, bool)

func GetStringMap

func GetStringMap(userKey, itemKey string) (map[string]string, bool)

func GetStrings

func GetStrings(userKey, itemKey string) ([]string, bool)

func GetUint64

func GetUint64(userKey, itemKey string) (uint64, bool)

func Init

func Init()

从配置文件获取 redis配置信息 config: redis

func RemoveItem

func RemoveItem(userKey, itemKey string) bool

func Store

func Store(key, itemKey string, item interface{}) error

Types

type Plugin

type Plugin interface {
	ParseConfig(prefix string) error
	Init() error
}

type Redis

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

func (*Redis) Init

func (r *Redis) Init() error

func (*Redis) ParseConfig

func (r *Redis) ParseConfig(prefix string) error

从文件解析 redis配置信息

Jump to

Keyboard shortcuts

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