redis

package
v0.0.0-...-6df3517 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnPool

type ConnPool struct {
	RedisPool *redis.Pool
}

ConnPool is RDS struct

func InitRedisPool

func InitRedisPool(host, password string, database, maxOpenConns, maxIdleConns int) *ConnPool

InitRedisPool func init RDS fd

func (*ConnPool) Close

func (p *ConnPool) Close() error

Close pool

func (*ConnPool) DelKey

func (p *ConnPool) DelKey(key string) (interface{}, error)

DelKey for key

func (*ConnPool) Do

func (p *ConnPool) Do(command string, args ...interface{}) (interface{}, error)

Do commands

func (*ConnPool) ExpireKey

func (p *ConnPool) ExpireKey(key string, seconds int64) (interface{}, error)

ExpireKey for key

func (*ConnPool) GetBytes

func (p *ConnPool) GetBytes(key string) ([]byte, error)

GetBytes for bytes

func (*ConnPool) GetHashMapInt

func (p *ConnPool) GetHashMapInt(key string) (map[string]int, error)

GetHashMapInt for hash map

func (*ConnPool) GetHashMapInt64

func (p *ConnPool) GetHashMapInt64(key string) (map[string]int64, error)

GetHashMapInt64 for hash map

func (*ConnPool) GetHashMapString

func (p *ConnPool) GetHashMapString(key string) (map[string]string, error)

GetHashMapString for hash map

func (*ConnPool) GetInt

func (p *ConnPool) GetInt(key string) (int, error)

GetInt for int

func (*ConnPool) GetInt64

func (p *ConnPool) GetInt64(key string) (int64, error)

GetInt64 for int64

func (*ConnPool) GetString

func (p *ConnPool) GetString(key string) (string, error)

GetString for string

func (*ConnPool) Keys

func (p *ConnPool) Keys(pattern string) ([]string, error)

Keys for key

func (*ConnPool) KeysByteSlices

func (p *ConnPool) KeysByteSlices(pattern string) ([][]byte, error)

KeysByteSlices for key

func (*ConnPool) SetHashMap

func (p *ConnPool) SetHashMap(key string, fieldValue map[string]interface{}) (interface{}, error)

SetHashMap for hash map

func (*ConnPool) SetString

func (p *ConnPool) SetString(key string, value interface{}) (interface{}, error)

SetString for string

Jump to

Keyboard shortcuts

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