Documentation ¶
Index ¶
- Constants
- type RedisCache
- func (r *RedisCache) Clear() error
- func (r *RedisCache) Get(key string, value *string) (bool, error)
- func (r *RedisCache) GetUnset(key string, value *string) (bool, error)
- func (r *RedisCache) Keys() ([]string, error)
- func (r *RedisCache) Set(key string, value string, ttlSeconds ...int) error
- func (r *RedisCache) Start()
- func (r *RedisCache) Stop()
- func (r *RedisCache) Touch(key string) error
- func (r *RedisCache) Unset(key string) error
- type RedisLock
- type RedisLocker
Constants ¶
View Source
const RedisCacheConfigPath = "redis_cache"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCache ¶
type RedisCache struct {
pubsub_redis.RedisClient
}
func NewCache ¶
func NewCache() *RedisCache
func (*RedisCache) Clear ¶
func (r *RedisCache) Clear() error
func (*RedisCache) GetUnset ¶
func (r *RedisCache) GetUnset(key string, value *string) (bool, error)
func (*RedisCache) Keys ¶
func (r *RedisCache) Keys() ([]string, error)
func (*RedisCache) Set ¶
func (r *RedisCache) Set(key string, value string, ttlSeconds ...int) error
func (*RedisCache) Start ¶
func (r *RedisCache) Start()
func (*RedisCache) Stop ¶
func (r *RedisCache) Stop()
func (*RedisCache) Touch ¶
func (r *RedisCache) Touch(key string) error
func (*RedisCache) Unset ¶
func (r *RedisCache) Unset(key string) error
type RedisLock ¶
type RedisLock struct {
// contains filtered or unexported fields
}
func (*RedisLock) NotObtained ¶
type RedisLocker ¶
type RedisLocker struct { *RedisCache // contains filtered or unexported fields }
func NewLocker ¶
func NewLocker(redisCache *RedisCache) *RedisLocker
Click to show internal directories.
Click to hide internal directories.