Documentation ¶
Index ¶
- Variables
- type Cache
- type CacheObjector
- type GoRedis
- func (r *GoRedis) DeleteObject(prefix string, x CacheObjector) error
- func (r *GoRedis) Exit() error
- func (r *GoRedis) LoadArray(prefix string, ownerId int64, pool *sync.Pool) ([]interface{}, error)
- func (r *GoRedis) LoadObject(prefix string, value interface{}, x CacheObjector) error
- func (r *GoRedis) SaveFields(prefix string, x CacheObjector, fields map[string]interface{}) error
- func (r *GoRedis) SaveObject(prefix string, x CacheObjector) error
- type Redigo
- func (r *Redigo) DeleteObject(prefix string, x CacheObjector) error
- func (r *Redigo) Exit() error
- func (r *Redigo) LoadArray(prefix string, ownerId int64, pool *sync.Pool) ([]interface{}, error)
- func (r *Redigo) LoadObject(prefix string, value interface{}, x CacheObjector) error
- func (r *Redigo) SaveFields(prefix string, x CacheObjector, fields map[string]interface{}) error
- func (r *Redigo) SaveObject(prefix string, x CacheObjector) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoResult = errors.New("cache return no result") ErrObjectNotFound = errors.New("cache object not found") )
cache find no result
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { SaveObject(prefix string, x CacheObjector) error SaveFields(prefix string, x CacheObjector, fields map[string]interface{}) error LoadObject(prefix string, value interface{}, x CacheObjector) error LoadArray(prefix string, ownerId int64, pool *sync.Pool) ([]interface{}, error) DeleteObject(prefix string, x CacheObjector) error Exit() error }
type CacheObjector ¶
CacheObjector save and load with all structure
type GoRedis ¶
type GoRedis struct { utils.WaitGroupWrapper // contains filtered or unexported fields }
func NewGoRedis ¶
func NewGoRedis(ctx *cli.Context) *GoRedis
func (*GoRedis) DeleteObject ¶
func (r *GoRedis) DeleteObject(prefix string, x CacheObjector) error
func (*GoRedis) LoadObject ¶
func (r *GoRedis) LoadObject(prefix string, value interface{}, x CacheObjector) error
func (*GoRedis) SaveFields ¶
func (r *GoRedis) SaveFields(prefix string, x CacheObjector, fields map[string]interface{}) error
func (*GoRedis) SaveObject ¶
func (r *GoRedis) SaveObject(prefix string, x CacheObjector) error
type Redigo ¶
type Redigo struct { utils.WaitGroupWrapper sync.RWMutex // contains filtered or unexported fields }
func (*Redigo) DeleteObject ¶
func (r *Redigo) DeleteObject(prefix string, x CacheObjector) error
func (*Redigo) LoadObject ¶
func (r *Redigo) LoadObject(prefix string, value interface{}, x CacheObjector) error
func (*Redigo) SaveFields ¶
func (r *Redigo) SaveFields(prefix string, x CacheObjector, fields map[string]interface{}) error
func (*Redigo) SaveObject ¶
func (r *Redigo) SaveObject(prefix string, x CacheObjector) error
Click to show internal directories.
Click to hide internal directories.