redis

package
v0.0.0-...-17a7386 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 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 Redis

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

func New

func New(host, password, sentinelName string, sentinels []string, database, maxIdle, maxActive, idleTimeout int, log *log.Log) *Redis

func SimpleClient

func SimpleClient(host, password string, database int, log *log.Log) *Redis

func (*Redis) Do

func (r *Redis) Do(command string, args ...interface{}) (interface{}, error)

func (*Redis) Expire

func (r *Redis) Expire(key string, lifeCycleSecond uint) (int, error)

func (*Redis) Get

func (r *Redis) Get(key string) (string, error)

func (*Redis) HDel

func (r *Redis) HDel(key, field string) (int, error)

func (*Redis) HGet

func (r *Redis) HGet(key, field string) (string, error)

func (*Redis) HGetAll

func (r *Redis) HGetAll(key string) (map[string]string, error)

func (*Redis) HIncrBy

func (r *Redis) HIncrBy(key, field string, value int) (int, error)

func (*Redis) HKeys

func (r *Redis) HKeys(key string) ([]string, error)

func (*Redis) HSet

func (r *Redis) HSet(key, field, value string) (int, error)

func (*Redis) HVals

func (r *Redis) HVals(key string) ([]string, error)

func (*Redis) LPush

func (r *Redis) LPush(key string, value string) (int, error)

func (*Redis) LRange

func (r *Redis) LRange(key string, start, stop int) ([]string, error)

func (*Redis) LTrim

func (r *Redis) LTrim(key string, start, stop int) (string, error)

func (*Redis) Ping

func (r *Redis) Ping() error

func (*Redis) SetEx

func (r *Redis) SetEx(key string, value interface{}, expire uint) (string, error)

func (*Redis) Stop

func (r *Redis) Stop()

Jump to

Keyboard shortcuts

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