ssdb

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSsdbCache

func NewSsdbCache() cache.Cache

NewSsdbCache create new ssdb adapter.

Types

type Cache

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

Cache SSDB adapter

func (*Cache) ClearAll

func (rc *Cache) ClearAll() error

ClearAll clear all cached in ssdb.

func (*Cache) Decr

func (rc *Cache) Decr(key string) error

Decr decrease counter.

func (*Cache) DelMulti

func (rc *Cache) DelMulti(keys []string) error

DelMulti get value from ssdb.

func (*Cache) Delete

func (rc *Cache) Delete(key string) error

Delete delete value in ssdb.

func (*Cache) Get

func (rc *Cache) Get(key string) interface{}

Get get value from ssdb.

func (*Cache) GetMulti

func (rc *Cache) GetMulti(keys []string) []interface{}

GetMulti get value from ssdb.

func (*Cache) Incr

func (rc *Cache) Incr(key string) error

Incr increase counter.

func (*Cache) IsExist

func (rc *Cache) IsExist(key string) bool

IsExist check value exists in ssdb.

func (*Cache) Put

func (rc *Cache) Put(key string, value interface{}, timeout time.Duration) error

Put put value to ssdb. only support string.

func (*Cache) Scan

func (rc *Cache) Scan(keyStart string, keyEnd string, limit int) ([]string, error)

Scan key all cached in ssdb.

func (*Cache) StartAndGC

func (rc *Cache) StartAndGC(config string) error

StartAndGC start ssdb adapter. config string is like {"conn":"connection info"}. if connecting error, return.

Jump to

Keyboard shortcuts

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