Documentation ¶
Overview ¶
Package simpleredis implements utility routines for interacting. It supports currently the following operations: GET, SET, DELETE, and support timetoleave for keys.
Index ¶
Constants ¶
View Source
const ( RedisUnreachable = "redis:unreachable" RedisMiss = "redis:miss" RedisTimeout = "redis:timeout" RedisNoAuth = "redis:noauth" RedisIssue = "redis:issue?" )
Error strings for redis.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleRedis ¶
type SimpleRedis struct {
// contains filtered or unexported fields
}
A SimpleRedis is used to communicate with redis.
func (*SimpleRedis) Del ¶
func (sr *SimpleRedis) Del(name string) error
Del removes the key name in redis.
func (*SimpleRedis) Get ¶
func (sr *SimpleRedis) Get(name string) ([]byte, error)
Get fetches the value for key name in redis.
func (*SimpleRedis) Init ¶
func (sr *SimpleRedis) Init(host, pass, database string)
Init sets the redisHost used to connect to redis.
Click to show internal directories.
Click to hide internal directories.