db

package
v0.0.0-...-64b69da Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addrs []string
	Pwd   string
	DB    int
}

type Redis

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

func NewRedis

func NewRedis(c Config) *Redis

func (*Redis) Del

func (r *Redis) Del(k string) error

func (*Redis) Expire

func (r *Redis) Expire(k string, t time.Duration) error

func (*Redis) Get

func (r *Redis) Get(k string) interface{}

func (*Redis) HDel

func (r *Redis) HDel(k, field string) error

func (*Redis) HGet

func (r *Redis) HGet(k, field string) string

func (*Redis) HGetAll

func (r *Redis) HGetAll(k string) map[string]string

func (*Redis) HSet

func (r *Redis) HSet(k, field string, value interface{}) error

func (*Redis) HSetTTL

func (r *Redis) HSetTTL(k, field string, value interface{}, t time.Duration) error

func (*Redis) Keys

func (r *Redis) Keys(k string) []string

func (*Redis) Set

func (r *Redis) Set(k, v string, t time.Duration) error

func (*Redis) Watch

func (r *Redis) Watch(ctx context.Context, key string) <-chan interface{}

Watch http://redisdoc.com/topic/notification.html

Jump to

Keyboard shortcuts

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