+func (s *SdlInstance) CheckRedisModuleExtensionCommands() {
+ var moduleError bool
+ commands, err := s.client.Command().Result()
+ if err == nil {
+ redisModuleCommands := []string{
+ "setie", "delie", "setiepub", "deliepub",
+ "setnxpub", "msetmpub", "delmpub",
+ }
+ for _, v := range redisModuleCommands {
+ _, ok := commands[v]
+ if !ok {
+ fmt.Println("ERROR: Missing command:", v)
+ moduleError = true
+ }
+ }
+ } else {
+ fmt.Println("ERROR:", err)
+ }
+ if moduleError {
+ fmt.Println("Please make sure that redis extension modules have been installed.")
+ fmt.Println("To install: redis-cli module load /usr/local/libexec/redismodule/libredismodule.so")
+ }
+}
+