redis.go 603 字节
Newer Older
Y
Your Name 已提交
1
package redispluginproxy
E
eoLinker API Management 已提交
2 3

import (
Y
Your Name 已提交
4
	redis_manager "github.com/eolinker/goku-api-gateway/common/redis-manager"
E
eoLinker API Management 已提交
5 6 7
	"github.com/eolinker/goku-plugin"
)

Y
Your Name 已提交
8
//Create 创建redisManager
E
eoLinker API Management 已提交
9 10 11 12 13 14 15 16 17 18
func Create() goku_plugin.RedisManager {

	return &RedisManager{
		def: &RedisProxy{
			redisClient: redis_manager.GetConnection(),
		},
	}

}

Y
Your Name 已提交
19
//RedisManager redisManager
E
eoLinker API Management 已提交
20 21 22 23
type RedisManager struct {
	def goku_plugin.Redis
}

Y
Your Name 已提交
24
//Default default
E
eoLinker API Management 已提交
25 26 27 28
func (m *RedisManager) Default() goku_plugin.Redis {
	return m.def
}

Y
Your Name 已提交
29
//Get get
E
eoLinker API Management 已提交
30 31 32
func (m *RedisManager) Get(name string) (redis goku_plugin.Redis, has bool) {
	panic("not implement")
}