redis

package
v0.0.0-...-29fac7b Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: MIT Imports: 7 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 *redislib.Client
}

func NewClient

func NewClient(cfg *config.Redis) (*RedisClient, error)

func (*RedisClient) Close

func (r *RedisClient) Close() error

func (*RedisClient) Del

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

func (*RedisClient) Get

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

func (*RedisClient) Health

func (r *RedisClient) Health(ctx context.Context) error

func (*RedisClient) Set

func (r *RedisClient) Set(ctx context.Context, key string, val string, expiry time.Duration) error

type RedisService

type RedisService interface {
	Get(ctx context.Context, key string) (string, error)
	Set(ctx context.Context, key string, val string, expiry time.Duration) error
	Del(ctx context.Context, key string) error
	Health(ctx context.Context) error
	Close() error
}

Jump to

Keyboard shortcuts

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