新增redis模块

This commit is contained in:
boyce
2019-02-01 15:25:04 +08:00
parent 8942ede22a
commit 02592f49ea
2 changed files with 766 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package sysmodule
import (
"fmt"
"testing"
)
func TestRedisModule(t *testing.T) {
var cfg ConfigRedis
var module RedisModule
cfg.IP = "192.168.0.5"
cfg.Password = ""
cfg.Port = "6379"
cfg.IdleTimeout = 2
cfg.MaxActive = 3
cfg.MaxIdle = 3
cfg.DbIndex = 15
module.Init(&cfg)
module.SetRedisHash("rediskey", "hashkey", "1111")
ret, err := module.GetRedisHashValueByKey("rediskey", "hashkey")
fmt.Print(ret, err)
}