Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEF_REDIS_INDEX = 1 // Redis默认索引 DEF_REDIS_PASSWORD = "abc#123" // Redis默认密码 DEF_REDIS_START_EXLE = 5 // Redis默认最大空闲连接数 DEF_REDIS_MAX_ACTIVE = 10 // Redis默认最大打开连接数 DEF_REDIS_IS_WAIT = true // Redis默认负荷时等待 DEF_TASK_CSIZE = 500 // 任务数量 )
----------------------------------------------------------------------------- =================================常量定义==================================== -----------------------------------------------------------------------------
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IRedisCacher ¶
type IRedisCacher interface { // 开启连接池 StartConnectPool(config *SConfig) error // 关闭连接 CloseConnectPool() // 执行命令 Execute(commandName string, args ...interface{}) (reply interface{}, err error) // 执行任务 ExecuteTask(taskType int, commandName string, args ...interface{}) error }
func MakeRedisCache ¶
func MakeRedisCache(config *SConfig, handler IRedisCacherHandler) (IRedisCacher, error)
type IRedisCacherHandler ¶
type IRedisCacherHandler interface { // 处理任务回应结果 HandleRedisTask(task *STask) }
type RedisCache ¶
type RedisCache struct { mss.ServiceHandle IRedisCacher }
func (*RedisCache) HandleInit ¶
func (this *RedisCache) HandleInit(own mss.ISeriOwner)
func (*RedisCache) HandleRedisTask ¶
func (this *RedisCache) HandleRedisTask(task *STask)
func (*RedisCache) HandleStat ¶
func (this *RedisCache) HandleStat() string
func (*RedisCache) HandleTerm ¶
func (this *RedisCache) HandleTerm(reason error)
func (*RedisCache) HandleTick ¶
func (this *RedisCache) HandleTick(now time.Time)
Click to show internal directories.
Click to hide internal directories.