Documentation ¶
Overview ¶
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Copyright 2018 The Redix Authors. All rights reserved. Use of this source code is governed by a Apache 2.0 license that can be found in the LICENSE file.
Index ¶
- Variables
- func Engine() string
- func FlushDB(n string)
- func Flushall()
- func GetEngineDirectory() string
- func GetUniqueInt() int64
- func GetUniqueString() string
- func HttpAddr() string
- func InitHTTPServer() error
- func InitRespServer(listenAddr, dbpath string) error
- func OpenDB(n string) (kvstore.DB, error)
- func RESPAddr() string
- func RemoveTag(k string) string
- func Rmdir(dir string) error
- func SelectDB(n string) (db kvstore.DB, err error)
- func SetBadgerMemory(size int64)
- func SetEngine(engine string)
- func SetStorageDir(dir string)
- func StorageDir() string
- func Worker() int
- type Change
- type CommandHandler
- type Context
Constants ¶
This section is empty.
Variables ¶
var (
Commands = map[string]CommandHandler{
"set": setCommand,
"mset": msetCommand,
"get": getCommand,
"mget": mgetCommand,
"del": delCommand,
"exists": existsCommand,
"incr": incrCommand,
"ttl": ttlCommand,
"keys": keysCommand,
"lpush": lpushCommand,
"lpushu": lpushuCommand,
"lrange": lrangeCommand,
"lrem": lremCommand,
"lcount": lcountCommand,
"lcard": lcountCommand,
"lsum": lsumCommand,
"lavg": lavgCommand,
"lmin": lminCommand,
"lmax": lmaxCommand,
"lsrch": lsearchCommand,
"lsrchcount": lsearchcountCommand,
"sadd": lpushuCommand,
"smembers": lrangeCommand,
"srem": lremCommand,
"scard": lcountCommand,
"sscan": lrangeCommand,
"hset": hsetCommand,
"hget": hgetCommand,
"hdel": hdelCommand,
"hgetall": hgetallCommand,
"hkeys": hkeysCommand,
"hmset": hmsetCommand,
"hexists": hexistsCommand,
"hincr": hincrCommand,
"httl": httlCommand,
"hlen": hlenCommand,
"publish": publishCommand,
"subscribe": subscribeCommand,
"webhookset": webhooksetCommand,
"webhookdel": webhookdelCommand,
"websocketopen": websocketopenCommand,
"websocketclose": websocketcloseCommand,
"encode": encodeCommand,
"uuidv4": uuid4Command,
"uniqid": uniqidCommand,
"randstr": randstrCommand,
"randint": randintCommand,
"time": timeCommand,
"dbsize": dbsizeCommand,
"gc": gcCommand,
"info": infoCommand,
"echo": echoCommand,
"flushdb": flushdbCommand,
"flushall": flushallCommand,
"ratelimitset": ratelimitsetCommand,
"ratelimittake": ratelimittakeCommand,
"ratelimitget": ratelimitgetCommand,
}
)
Functions ¶
func GetEngineDirectory ¶
func GetEngineDirectory() string
func InitHTTPServer ¶
func InitHTTPServer() error
func InitRespServer ¶
func SetBadgerMemory ¶
func SetBadgerMemory(size int64)
func SetStorageDir ¶
func SetStorageDir(dir string)
func StorageDir ¶
func StorageDir() string
Types ¶
type Change ¶
type Change struct { Namespace string `json:"namespace"` Command string `json:"command"` Arguments []string `json:"arguments"` }
Change - a change feed
type CommandHandler ¶
type CommandHandler func(c Context)
CommandHandler - represents a handler for a command