db

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 6 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 added in v0.2.0

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 added in v0.2.0

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