redis

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpireWithResult

func ExpireWithResult(rds *redis.Redis, key string, seconds int) (bool, error)

ExpireWithResult is like redis.Expire but returns the boolean result indicating whether the timeout was actually set.

func ExpireWithResultCtx

func ExpireWithResultCtx(ctx context.Context, rds *redis.Redis, key string, seconds int) (bool, error)

ExpireWithResultCtx is like redis.ExpireCtx but returns the boolean result indicating whether the timeout was actually set.

func MsetStrings

func MsetStrings(rds *redis.Redis, fieldsAndValues map[string]string) error

MsetStrings sets multiple key-value pairs where values are strings.

func MsetStringsCtx

func MsetStringsCtx(ctx context.Context, rds *redis.Redis, fieldsAndValues map[string]string) error

MsetStringsCtx sets multiple key-value pairs where values are strings.

func Msetnx

func Msetnx(rds *redis.Redis, fieldsAndValues map[string]string) (bool, error)

Msetnx sets multiple key-value pairs only if none of the keys exist. Returns true if all keys were set, false if no key was set.

func MsetnxCtx

func MsetnxCtx(ctx context.Context, rds *redis.Redis, fieldsAndValues map[string]string) (bool, error)

MsetnxCtx sets multiple key-value pairs only if none of the keys exist. Returns true if all keys were set, false if no key was set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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