redis

package
v0.0.0-...-75d87db Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Timeout = 1
)

Constants: Timeout connect to redis

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address  string
	Password string
	Database int
}

Config redis

type IRedis

type IRedis interface {
	IsConnected() bool
	Get(key string, value interface{}) error
	Set(key string, value interface{}) error
	SetWithExpiration(key string, value interface{}, expiration time.Duration) error
	Remove(keys ...string) error
	Keys(pattern string) ([]string, error)
	RemovePattern(pattern string) error
}

IRedis interface

func New

func New(config Config) IRedis

New new Redis interface with config

Jump to

Keyboard shortcuts

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