kvdb

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string, callback KVDBGetCallback)

Get gets value of key from KVDB, returns in callback

func GetOrPut

func GetOrPut(key string, val string, callback KVDBGetOrPutCallback)

GetOrPut gets value of key from KVDB, if val not exists or is "", put key-value to KVDB.

func GetRange

func GetRange(beginKey string, endKey string, callback KVDBGetRangeCallback)

GetRange retrives key-value items of specified key range, returns in callback

func Initialize

func Initialize()

Initialize the KVDB

Called by game server engine

func NextLargerKey

func NextLargerKey(key string) string

NextLargerKey finds the next key that is larger than the specified key, but smaller than any other keys that is larger than the specified key

func Put

func Put(key string, val string, callback KVDBPutCallback)

Put puts key-value item to KVDB, returns in callback

Types

type KVDBGetCallback

type KVDBGetCallback func(val string, err error)

KVDBGetCallback is type of KVDB Get callback

type KVDBGetOrPutCallback

type KVDBGetOrPutCallback func(oldVal string, err error)

KVDBGetOrPutCallback is type of KVDB GetOrPut callback

type KVDBGetRangeCallback

type KVDBGetRangeCallback func(items []kvdbtypes.KVItem, err error)

KVDBGetRangeCallback is type of KVDB GetRange callback

type KVDBPutCallback

type KVDBPutCallback func(err error)

KVDBPutCallback is type of KVDB Get callback

Directories

Path Synopsis
backend

Jump to

Keyboard shortcuts

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