redlot

package
v0.0.0-...-893ef4f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close LevelDB

func Del

func Del(args [][]byte) (interface{}, error)

Del will delete a value by a key. Args: key string

func Exists

func Exists(args [][]byte) (interface{}, error)

Exists will check key is exists. Args: key string

func Expire

func Expire(args [][]byte) (interface{}, error)

Expire the key after timeout. Args: key string, seconds int

func Get

func Get(args [][]byte) (interface{}, error)

Get a value by a key. Args: key string

func Hclear

func Hclear(args [][]byte) (r interface{}, err error)

Hclear will remove all value in the hashmap. Args: name string

func Hdel

func Hdel(args [][]byte) (r interface{}, err error)

Hdel will delete a hashmap value by the key. Args: name string, key string

func Hexists

func Hexists(args [][]byte) (r interface{}, err error)

Hexists will check the hashmap key is exists. Args: name string, key string

func Hget

func Hget(args [][]byte) (r interface{}, err error)

Hset will return a hashmap value by the key. Args: name string, key string

func Hgetall

func Hgetall(args [][]byte) (r []string, err error)

Hgetall will list all keys/value in the hashmap. Args: name string

func Hincr

func Hincr(args [][]byte) (r interface{}, err error)

Hincr will incr a hashmap value by the key. Args: name string, key string

func Hincrby

func Hincrby(args [][]byte) (r interface{}, err error)

Hincrby will incr number a hashmap value by the key. Args: name string, key string, value int

func Hkeys

func Hkeys(args [][]byte) (r []string, err error)

Hkeys will list the hashmap keys in the range. Args: name string, start string, end string, limit int

func Hlist

func Hlist(args [][]byte) (r []string, err error)

Hlist will list all hashmap in the range. Args: start string, end string, limit int

func Hrkeys

func Hrkeys(args [][]byte) (r []string, err error)

Hrkeys will reverse list the hashmap keys in the range. Args: name string, start string, end string, limit int

func Hrlist

func Hrlist(args [][]byte) (r []string, err error)

Hrlist will reverse list all hashmap in the range. Args: start string, end string, limit int

func Hrscan

func Hrscan(args [][]byte) (r []string, err error)

Hrscan will reverse list keys/value of the hashmap in the range. Args: name string, start string, end string, limit int

func Hscan

func Hscan(args [][]byte) (r []string, err error)

Hscan will list keys/value of the hashmap in the range. Args: name string, start string, end string, limit int

func Hset

func Hset(args [][]byte) (r interface{}, err error)

Hset will set a hashmap value by the key. Args: name string, key string, value any

func Hsize

func Hsize(args [][]byte) (r interface{}, err error)

Hsize will return the hashmap size. Args: name string

func Incr

func Incr(args [][]byte) (interface{}, error)

Incr 1. Args: key string

func KeyRange

func KeyRange() string

KeyRange will return key range.

func Keys

func Keys(args [][]byte) ([]string, error)

Keys will list keys in the range. Args: start_key string, end_key string, limit_number int

func MultiDel

func MultiDel(args [][]byte) (interface{}, error)

MultiDel wil batch delete value by keys.

func MultiGet

func MultiGet(args [][]byte) (r []string, err error)

MultiGet wil batch read data from db.

func MultiHdel

func MultiHdel(args [][]byte) (r interface{}, err error)

MultiHdel will delete multi hashmap value by keys.

func MultiHget

func MultiHget(args [][]byte) (r []string, err error)

MultiHget will return multi hashmap value by keys.

func MultiHset

func MultiHset(args [][]byte) (r interface{}, err error)

MultiHset will set multi hashmap value by keys.

func MultiSet

func MultiSet(args [][]byte) (interface{}, error)

MultiSet wil batch write data to db.

func Open

func Open(o *Options)

Open LevelDB.

func Rkeys

func Rkeys(args [][]byte) ([]string, error)

Rkeys will reverse list keys in the range. Args: start_key string, end_key string, limit_number int

func Rscan

func Rscan(args [][]byte) ([]string, error)

Rscan will reverse list KV pair that keys in the range. Args: start_key string, end_key string, limit_number int

func Scan

func Scan(args [][]byte) ([]string, error)

Scan will list KV pair that keys in the range. Args: start_key string, end_key string, limit_number int

func Set

func Set(args [][]byte) (interface{}, error)

Set a value by a key. Args: key string, value any

func Setx

func Setx(args [][]byte) (interface{}, error)

Setx will set a value by the key and expire it after timeout. Args: key string, value any, seconds int

func TTL

func TTL(args [][]byte) (interface{}, error)

TTL will return the lifetime of the key. Args: key string

Types

type Options

type Options struct {
	DataPath          string
	CacheSize         int
	BlockSize         int
	WriteBuffer       int
	CompactionBackoff bool
}

Options of redlot

Jump to

Keyboard shortcuts

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