Documentation
¶
Index ¶
- func ArrayOfBytes(results interface{}, err error) ([][]byte, error)
- func ArrayOfInts(results interface{}, err error) ([]int, error)
- func ArrayOfStrings(results interface{}, err error) ([]string, error)
- func GetMembers(members []*ScoredMember) []string
- func Prefix(namespace string, keys []string) []string
- func ReadWriteHosts(hosts []*RedisHosts) (read []string, write []string)
- func StringsToInterfaces(keys []string) []interface{}
- type Client
- type KeyValueString
- type RedisCache
- func (r *RedisCache) GetBytes(key string) (result []byte, err error)
- func (r *RedisCache) GetHashInt64(hashName string) (map[string]int64, error)
- func (r *RedisCache) GetObject(key string, instance interface{}) (miss bool, err error)
- func (r *RedisCache) Increment(hashName, fieldName string, by int) (int64, error)
- func (r *RedisCache) Ping() error
- func (r *RedisCache) Read(command string, args ...interface{}) (interface{}, error)
- func (r *RedisCache) ReadInt64(command string, args ...interface{}) (int64, error)
- func (r *RedisCache) SetBytes(key string, bytes []byte) error
- func (r *RedisCache) Write(command string, args ...interface{}) (interface{}, error)
- type RedisHosts
- type ScoredMember
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayOfBytes ¶
func ArrayOfInts ¶
func ArrayOfStrings ¶
func GetMembers ¶
func GetMembers(members []*ScoredMember) []string
func ReadWriteHosts ¶
func ReadWriteHosts(hosts []*RedisHosts) (read []string, write []string)
func StringsToInterfaces ¶
func StringsToInterfaces(keys []string) []interface{}
Types ¶
type KeyValueString ¶
type RedisCache ¶
type RedisCache struct {
Log logging.Logger `inject:""`
Encoder func(v interface{}) ([]byte, error)
Decoder func(data []byte, v interface{}) error
// contains filtered or unexported fields
}
func NewService ¶
func NewService(readUris []string, writeUris []string, hostPassword string) (*RedisCache, error)
NewRedisCache creates a new cache service connecting to the given hostUris and hostPassword. If there is no hostPassword, then pass an empty string.
func (*RedisCache) GetHashInt64 ¶
func (r *RedisCache) GetHashInt64(hashName string) (map[string]int64, error)
func (*RedisCache) GetObject ¶
func (r *RedisCache) GetObject(key string, instance interface{}) (miss bool, err error)
func (*RedisCache) Increment ¶
func (r *RedisCache) Increment(hashName, fieldName string, by int) (int64, error)
func (*RedisCache) Ping ¶
func (r *RedisCache) Ping() error
func (*RedisCache) Read ¶
func (r *RedisCache) Read(command string, args ...interface{}) (interface{}, error)
func (*RedisCache) ReadInt64 ¶
func (r *RedisCache) ReadInt64(command string, args ...interface{}) (int64, error)
func (*RedisCache) Write ¶
func (r *RedisCache) Write(command string, args ...interface{}) (interface{}, error)
type RedisHosts ¶
type ScoredMember ¶
Click to show internal directories.
Click to hide internal directories.