redis

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	MaxIdle        int
	MaxActive      int
	MaxIdleTimeout int
	Host           string
	Port           uint
	Password       string
	DbIndex        int
	ConnectTimeout int
	ReadTimeout    int
	WriteTimeout   int
	Wait           bool
	TTL            int
	Prefix         string
}

func DefaultOption

func DefaultOption() Option

type PineRedis

type PineRedis struct {
	// contains filtered or unexported fields
}

func New

func New(opt Option) *PineRedis

func (*PineRedis) Delete

func (r *PineRedis) Delete(key string) error

func (*PineRedis) Exists

func (r *PineRedis) Exists(key string) bool

func (*PineRedis) Get

func (r *PineRedis) Get(key string) ([]byte, error)

func (*PineRedis) GetWithUnmarshal

func (r *PineRedis) GetWithUnmarshal(key string, receiver interface{}) error

func (*PineRedis) Pool

func (r *PineRedis) Pool() *redisgo.Pool

func (*PineRedis) RedisPool

func (r *PineRedis) RedisPool() *redisgo.Pool

func (*PineRedis) Set

func (r *PineRedis) Set(key string, val []byte, ttl ...int) error

func (*PineRedis) SetWithMarshal

func (r *PineRedis) SetWithMarshal(key string, structData interface{}, ttl ...int) error

Jump to

Keyboard shortcuts

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