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

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

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

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

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

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

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