redis

package
v0.0.0-...-a727419 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Client *redis.Client
}

func NewClient

func NewClient(ctx context.Context, host string) *Connection

func (*Connection) CheckTTL

func (c *Connection) CheckTTL(ctx context.Context, key string) (time.Duration, error)

func (*Connection) Delete

func (c *Connection) Delete(ctx context.Context, key string) error

func (*Connection) Exists

func (c *Connection) Exists(ctx context.Context, key string) (bool, error)

func (*Connection) HGetAll

func (c *Connection) HGetAll(ctx context.Context, key string, vmap map[string]any) error

func (*Connection) HSet

func (c *Connection) HSet(ctx context.Context, key string, value any, expiration time.Duration) error

func (*Connection) Set

func (c *Connection) Set(ctx context.Context, key string, value any, expiration time.Duration) error

Jump to

Keyboard shortcuts

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