redis

package
v0.0.0-...-3d69af2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisClient

type RedisClient struct {
	Client *redis.Client
}

RedisClient represents a Redis client wrapper

func NewRedisClient

func NewRedisClient(url string) (*RedisClient, error)

NewRedisClient creates and returns a new Redis client

func (*RedisClient) Close

func (r *RedisClient) Close() error

Close closes the Redis connection

func (*RedisClient) Delete

func (r *RedisClient) Delete(ctx context.Context, key string) error

Delete removes a key from Redis

func (*RedisClient) Get

func (r *RedisClient) Get(ctx context.Context, key string) (string, error)

Get retrieves a value by key

func (*RedisClient) Set

func (r *RedisClient) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error

Set stores a value with an optional expiration

Jump to

Keyboard shortcuts

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