redis

package
v1.3.90 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List[T cachestore.Record](rc *Client, nr T) ([]T, error)

Types

type Client

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

func NewClient

func NewClient(pCtx context.Context, conf Config) (*Client, error)

func NewTestClient

func NewTestClient(pCtx context.Context, dbc *redis.Client) *Client

func (*Client) CompareAndDelete

func (rc *Client) CompareAndDelete(nr cachestore.Record, compareValueFunc func(cachestore.Record, cachestore.Record) bool) (bool, error)

func (*Client) Del

func (rc *Client) Del(nr cachestore.Record) error

func (*Client) Get

func (rc *Client) Get(nr cachestore.Record) error

TODO remove reflect, return (Record, error) TODO support to define key with tag, then no need to call Where

func (*Client) GetRaw

func (rc *Client) GetRaw() *redis.Client

func (*Client) ResetClient

func (rc *Client) ResetClient(realDbClient *redis.Client)

func (*Client) Set

func (rc *Client) Set(nr cachestore.Record, expireAfterInSec int64) error

func (*Client) Update

func (rc *Client) Update(nr cachestore.Record) error

func (*Client) Where

func (rc *Client) Where(query string) *Client

type Config

type Config struct {
	Addr     string
	Password string
}

type RecordUnmarshaler

type RecordUnmarshaler interface {
	Unmarshal(string) error
}

Jump to

Keyboard shortcuts

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