cache

package
v0.0.0-...-e89c278 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(addr string, db int, password string) error

func Decr

func Decr(key string) (int64, error)

func DecrBy

func DecrBy(key string, value int64) (int64, error)

func Del

func Del(keys ...string) (int64, error)

func Exists

func Exists(keys ...string) (bool, error)

func Expire

func Expire(key string, timeout time.Duration) (bool, error)

func FreqCheck

func FreqCheck(key string, limit int64, timeout time.Duration) (bool, error)

func FreqTryLock

func FreqTryLock(key string, limit int64, timeout time.Duration) (time.Duration, error)

func Get

func Get(key string) (string, error)

func GetFloat64

func GetFloat64(key string) (float64, error)

func GetInt64

func GetInt64(key string) (int64, error)

func GetJson

func GetJson(key string, j interface{}) error

func GetStatistics

func GetStatistics(key string, duration time.Duration, t time.Time) int64

func GetStatisticsForFloat

func GetStatisticsForFloat(key string, duration time.Duration, t time.Time) float64

func GetUint64

func GetUint64(key string) (uint64, error)

func HDecr

func HDecr(key string, field string) (int64, error)

func HDecrBy

func HDecrBy(key string, field string, increment int64) (int64, error)

func HDel

func HDel(key string, fields ...string) (int64, error)

func HGet

func HGet(key, field string) (string, error)

func HGetAll

func HGetAll(key string) (map[string]string, error)

func HGetJson

func HGetJson(key, field string, j interface{}) error

func HIncr

func HIncr(key string, subKey string) (int64, error)

func HIncrBy

func HIncrBy(key string, field string, increment int64) (int64, error)

func HIncrByFloat

func HIncrByFloat(key string, field string, increment float64) (float64, error)

func HKeys

func HKeys(key string) ([]string, error)

func HSet

func HSet(key string, field string, value interface{}) (bool, error)

func HVals

func HVals(key string) ([]string, error)

func Incr

func Incr(key string) (int64, error)

func IncrBy

func IncrBy(key string, value int64) (int64, error)

func IncrByFloat

func IncrByFloat(key string, increment float64) (float64, error)

func Lock

func Lock(key string, timeout time.Duration)

func SAdd

func SAdd(key string, members ...string) (int64, error)

func SMembers

func SMembers(key string) ([]string, error)

func SRem

func SRem(key string, members ...string) (int64, error)

func Set

func Set(key string, value interface{}) (bool, error)

func SetEx

func SetEx(key string, value interface{}, timeout time.Duration) (bool, error)

func SetNx

func SetNx(key string, value interface{}) (bool, error)

func SetNxWithTimeout

func SetNxWithTimeout(key string, value interface{}, timeout time.Duration) (bool, error)

func Statistics

func Statistics(key string, durations ...time.Duration)

func StatisticsIncr

func StatisticsIncr(key string, durations ...time.Duration)

func StatisticsIncrBy

func StatisticsIncrBy(key string, val int64, durations ...time.Duration)

func StatisticsIncrByFloat

func StatisticsIncrByFloat(key string, val float64, durations ...time.Duration)

func TryLock

func TryLock(key string, timeout time.Duration) (bool, error)

func Ttl

func Ttl(key string) (time.Duration, error)

func Unlock

func Unlock(key string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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