Implemented LoadModules method to load external modules at runtime.

Implemented UnloadModules method to remove modules at runtime.
Implemented ListModules method to list the current loaded modules.
Implemented "MODULE LOAD", "MODULE UNLOAD", and "MODULE LIST" commands.
This commit is contained in:
Kelvin Clement Mwinuka
2024-05-03 11:57:21 +08:00
parent 276ca0fb63
commit 0f6ae1c8ac
14 changed files with 289 additions and 56 deletions

View File

@@ -78,6 +78,9 @@ type HandlerFuncParams struct {
TakeSnapshot func() error
RewriteAOF func() error
GetLatestSnapshotTime func() int64
LoadModule func(path string, args ...string) error
UnloadModule func(module string)
ListModules func() []string
}
type HandlerFunc func(params HandlerFuncParams) ([]byte, error)