redis

package
v0.0.0-...-2500713 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 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 Config

type Config struct {
	RedisURL string
}

type RedisClient

type RedisClient struct {
	// contains filtered or unexported fields
}

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) HealthCheck

func (r *RedisClient) HealthCheck() error

func (*RedisClient) Set

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

type RedisClientInterface

type RedisClientInterface interface {
	HealthCheck() error
	Get(ctx context.Context, key string) (string, error)
	Set(ctx context.Context, key string, value string, expire time.Duration) error
	Del(ctx context.Context, key string) error
}

func NewRedisClient

func NewRedisClient(config Config) RedisClientInterface

Jump to

Keyboard shortcuts

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