Documentation
¶
Index ¶
- Constants
- Variables
- type Cache
- type Config
- type Redis
- func (r *Redis) DeQueue(key string) (interface{}, error)
- func (r *Redis) Delete(key string) error
- func (r *Redis) EnQueue(key string, value interface{}) error
- func (r *Redis) Get(key string, data interface{}) error
- func (r *Redis) IsOK() error
- func (r *Redis) Set(key string, value interface{}, expire time.Duration) error
Constants ¶
View Source
const ( PREFIX = "#" KEY_PP = "PP" )
Variables ¶
View Source
var (
TtlPP = time.Second * time.Duration(600)
)
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { IsOK() error Get(key string, data interface{}) error Delete(key string) error Set(key string, value interface{}, expire time.Duration) error EnQueue(key string, value interface{}) error DeQueue(key string) (interface{}, error) }
Cache
type Config ¶
type Config struct { Engine string `yaml:"Engine"` Host string `yaml:"Host"` Port string `yaml:"Port"` Pass string `yaml:"Pass"` DB int `yaml:"DB"` LifeTime int64 `yaml:"LifeTime"` }
Redis Config
Click to show internal directories.
Click to hide internal directories.