Commit 71579d9f by 孙龙

up

parent e7bb14bb
Showing with 21 additions and 0 deletions
......@@ -7,6 +7,26 @@ import (
"time"
)
type IchuntRedisInterface interface {
get()
set()
}
type IchuntRedis struct {
}
func(this *IchuntRedis) Connection(connection string,host string,passwd string) (*redis.Pool,error){
redisHost :=config.Get(host).String()
redisPasswd := config.Get(passwd).String()
redisPoll, err := getConn(redisHost, redisPasswd)
if err != nil {
return nil,err
}
return redisPoll,nil
}
var writeConn, readConn *redis.Pool
func Setup() (err error) {
......@@ -139,3 +159,4 @@ func HDelete(key string, k interface{}) (bool, error) {
return redis.Bool(conn.Do("HDEL", key, k))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment