db

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var POOL *redis.Pool

Functions

func Delete

func Delete(database int, key string) error

Delete 删除

func Do

func Do(database int, pFunc func(c redis.Conn) (reply interface{}, err error)) (reply interface{}, err error)

/Do a func can do no defer close

func Exist

func Exist(database int, key string) bool

IsExist 判断key是否存在

func Expire

func Expire(database, timeout int, key string) error

Expire 超时

func Get

func Get(database int, key string) ([]byte, error)

/Get 获取一个值

func OpenRedisPool

func OpenRedisPool(ip, pwd string) error

@title 启动redis, redispo.Pool(连接池)

func Set

func Set(database int, timeout int, key string, val interface{}) (err error)

Set 设置一个值

Types

This section is empty.

Jump to

Keyboard shortcuts

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