redis

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[T any] interface {
	SetJSON(key string, value *T, expiration time.Duration) error
	GetJSON(key string) (*T, error)
	SetJSONList(key string, values []*T, expiration time.Duration) error
	GetJSONList(key string) ([]*T, error)
}

func NewCache

func NewCache[T any](store Store) Cache[T]

type Config

type Config struct {
	Host string
	Port uint16
	Pwd  string
	DB   int
}

type Store

type Store interface {
	GetInstance() *store
	Connect()
	Disconnect()
}

func NewStore

func NewStore(context context.Context, config *Config) Store

Jump to

Keyboard shortcuts

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