MODULE LOAD | SugarDB (original) (raw)
Syntax
MODULE LOAD path [arg [arg ...]]
Module
admin
Categories
admin dangerous fast
Description
Load a module from a dynamic library at runtime. The path should be the full path to the module, including the .so filename. Any args will be passed unmodified to the module's key extraction and handler functions.
Examples
- Go (Embedded)
- CLI
Load a modules with no args:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
err := server.LoadModule("/path/to/module.so")
Load a module with a few args:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
err := server.LoadModule("/path/to/module.so", "arg1", "arg2", "arg3")