redis

package
v0.0.0-...-dd3c66b Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 3 Imported by: 0

README

redis


func (j *job) Run() {
    // ...
    j.r, err := redis.NewRedis(config)
    j.r.Get(ctx, "key")
    // ...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address          string `mapstructure:"address"`
	Password         string `mapstructure:"password"`
	MaxOpen          int    `mapstructure:"max-open"`
	IdleConns        int    `mapstructure:"idle-conns"`
	IdleTimout       int    `mapstructure:"idle-timeout"`
	OperationTimeout int    `mapstructure:"operation-timeout"`
}

Config 配置信息

type Redis

type Redis struct {
	*redis.Client
}

func NewRedis

func NewRedis(config Config) (*Redis, error)

func (*Redis) Close

func (r *Redis) Close() error

Jump to

Keyboard shortcuts

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