redis

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultShutdownTimeout = 10 * time.Second
	DefaultShutdownHandler = true
)
View Source
const Nil = redis.Nil

Nil reply returned by Redis when key does not exist.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Client() *redis.Client
	SetClient(client *redis.Client) Interface
	UseTelemetry(telemetry telemetry.Interface) error
	GetShutdownTimeout() time.Duration
	GetShutdownHandler() bool
	Shutdown(ctx context.Context, reason string) error
	ShutdownHandler(sig os.Signal) error
}

func New

func New(opts ...Option) Interface

type Option

type Option func(*r)

func WithClient

func WithClient(client *redis.Client) Option

func WithClientOptions

func WithClientOptions(opts ...client.Option) Option

func WithShutdownTimeout

func WithShutdownTimeout(timeout time.Duration) Option

func WithoutShutdownHandler

func WithoutShutdownHandler() Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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