redis

package
v0.0.0-...-6c4a9fb Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decr

func Decr(ctx context.Context, key string) (result int64, err error)

Decr redis value-- result is the value after value-- if the key not exist, return -1

func Del

func Del(ctx context.Context, key string) (aff int64, err error)

func Get

func Get(ctx context.Context, key string) (result string, err error)

func GetInt

func GetInt(ctx context.Context, key string) (result int, err error)

func Incr

func Incr(ctx context.Context, key string) (result int64, err error)

Incr redis value++ result is the value after value++ if the key not exist, return 1

func Init

func Init()

func Set

func Set(ctx context.Context, key string, value interface{}, expireTime time.Duration) (result string, err error)

func SetNX

func SetNX(ctx context.Context, key string, value interface{}, expireTime time.Duration) (result bool, err error)

SetNX if not lock, return false

Types

This section is empty.

Jump to

Keyboard shortcuts

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