Skip to content

installers.db.zdb #

Vlang ZDB Client

to use:

to use test

##r#mkdir -p ~/.zdb
zdb --socket ~/.zdb/socket --admin 1234
redis-cli -s ~/.zdb/socket
#redis-cli -s ~/.zdb/socket --raw nsinfo default

then in the redis-cli can do e.g.

nsinfo default

fn build #

fn build() !

install zdb will return true if it was already installed

fn check #

fn check() !bool

fn client #

fn client() !zdb.ZDB

fn install #

fn install(args_ InstallArgs) !

fn restart #

fn restart(args_ InstallArgs) !

fn secret #

fn secret() !string

fn start #

fn start(args_ InstallArgs) !

fn stop #

fn stop(args_ InstallArgs) !

struct InstallArgs #

@[params]
struct InstallArgs {
pub mut:
	reset        bool
	secret       string
	start        bool = true
	restart      bool
	sequential   bool // if sequential then we autoincrement the keys
	datadir      string ='${os.home_dir()}/var/zdb/data'
	indexdir     string ='${os.home_dir()}/var/zdb/index'
	rotateperiod int    = 1200 // 20 min
}