redis

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const KeyRedis runtime.Key = "redis"

Variables

View Source
var ErrNotInitialized = errors.New("redis not initialized")

Functions

func Bind

func Bind(app *runtime.App, client *RuntimeClient) error

func Client

func Client(ctxs ...context.Context) *goredis.Client

func ClientFrom

func ClientFrom(app *runtime.App) *goredis.Client

func Close

func Close() error

func Health

func Health(ctx context.Context) error

func Init

func Init(ctx context.Context, cfg Config, log *zap.Logger) error

func Raw

func Raw() *goredis.Client

Types

type Config

type Config = redisx.Config

type Hook

type Hook struct {
	Log *zap.Logger
}

func NewHook

func NewHook(log *zap.Logger) Hook

func (Hook) DialHook

func (h Hook) DialHook(next goredis.DialHook) goredis.DialHook

func (Hook) ProcessHook

func (h Hook) ProcessHook(next goredis.ProcessHook) goredis.ProcessHook

func (Hook) ProcessPipelineHook

func (h Hook) ProcessPipelineHook(next goredis.ProcessPipelineHook) goredis.ProcessPipelineHook

type RuntimeClient

type RuntimeClient = redisx.Client
var (
	Default *RuntimeClient
	RDB     *goredis.Client
)

func From

func From(app *runtime.App) *RuntimeClient

func New

func New(cfg Config, log *zap.Logger) *RuntimeClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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