redis

package
v0.0.0-...-b401549 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package redis implements Redis connection.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotExists = errors.New("key not exists")
	Nil             = redis.Nil
)

Functions

This section is empty.

Types

type Option

type Option func(*Redis)

Option -.

func DialTimeout

func DialTimeout(timeout time.Duration) Option

DialTimeout -.

func MaxRetries

func MaxRetries(retries int) Option

MaxRetries -.

func ReadTimeout

func ReadTimeout(timeout time.Duration) Option

ReadTimeout -.

func WriteTimeout

func WriteTimeout(timeout time.Duration) Option

WriteTimeout -.

type Redis

type Redis struct {
	Client *redis.Client
	// contains filtered or unexported fields
}

Redis -.

func New

func New(addr string, opts ...Option) (*Redis, error)

New -.

func (*Redis) Close

func (r *Redis) Close()

Close -.

Jump to

Keyboard shortcuts

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