Documentation ¶
Overview ¶
缓存 todo 以后增加关闭项目缓存数据,启动时候加载进来
用slice做简单队列
Index ¶
- Variables
- func Float64(reply interface{}, err error) (float64, error)
- func Int(reply interface{}, err error) (int, error)
- func Int64(reply interface{}, err error) (int64, error)
- func String(reply interface{}, err error) (string, error)
- type CacheItem
- type CacheTable
- func (p *CacheTable) Add(k, v interface{}, l ...int) *CacheItem
- func (p *CacheTable) Count(k interface{}) int
- func (p *CacheTable) Delete(k interface{}) (*CacheItem, error)
- func (p *CacheTable) Exists(k interface{}) bool
- func (p *CacheTable) Float64(reply interface{}, err error) (float64, error)
- func (p *CacheTable) Get(k interface{}) (interface{}, error)
- func (p *CacheTable) Int(reply interface{}, err error) (int, error)
- func (p *CacheTable) Int64(reply interface{}, err error) (int64, error)
- func (p *CacheTable) Item(k interface{}) *CacheItem
- func (p *CacheTable) Items() map[interface{}]*CacheItem
- func (p *CacheTable) Set(k, v interface{}, l ...int) *CacheItem
- func (p *CacheTable) String(reply interface{}, err error) (string, error)
- type SimpleQueue
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNil = errors.New("nil or type error")
)
Functions ¶
Types ¶
type CacheTable ¶
func Cache ¶
func Cache(table string) *CacheTable
func (*CacheTable) Add ¶
func (p *CacheTable) Add(k, v interface{}, l ...int) *CacheItem
func (*CacheTable) Count ¶
func (p *CacheTable) Count(k interface{}) int
func (*CacheTable) Delete ¶
func (p *CacheTable) Delete(k interface{}) (*CacheItem, error)
func (*CacheTable) Exists ¶
func (p *CacheTable) Exists(k interface{}) bool
func (*CacheTable) Float64 ¶
func (p *CacheTable) Float64(reply interface{}, err error) (float64, error)
func (*CacheTable) Get ¶
func (p *CacheTable) Get(k interface{}) (interface{}, error)
func (*CacheTable) Item ¶
func (p *CacheTable) Item(k interface{}) *CacheItem
func (*CacheTable) Items ¶
func (p *CacheTable) Items() map[interface{}]*CacheItem
func (*CacheTable) Set ¶
func (p *CacheTable) Set(k, v interface{}, l ...int) *CacheItem
type SimpleQueue ¶
func NewSimpleQueue ¶
func NewSimpleQueue(initSize int) *SimpleQueue
func (*SimpleQueue) Count ¶
func (p *SimpleQueue) Count() int
func (*SimpleQueue) Insert ¶
func (p *SimpleQueue) Insert(v interface{}) error
Click to show internal directories.
Click to hide internal directories.