redis

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewRedis

func NewRedis(ctx context.Context, config config, options ...Options) (*Client, error)

func (*Client) Del

func (c *Client) Del(ctx context.Context, keys ...string) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, key string) (string, error)

func (*Client) GetRedisClient

func (c *Client) GetRedisClient() *redis.Client

func (*Client) Set

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

type Config

type Config struct {
	Host     string
	Port     string
	Password string
	DB       int
}

func (Config) GetAddr

func (c Config) GetAddr() string

func (Config) GetDB

func (c Config) GetDB() int

func (Config) GetPassword

func (c Config) GetPassword() string

type Options

type Options func(*redis.Options)

Jump to

Keyboard shortcuts

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