Documentation ¶
Index ¶
- type Dao
- func (d *Dao) Add(ctx context.Context, mid int64, h *model.History) (err error)
- func (d *Dao) AddCache(c context.Context, mid int64, h *model.History) (err error)
- func (d *Dao) AddCacheMap(c context.Context, mid int64, hm map[int64]*model.History) (err error)
- func (d *Dao) AddMap(ctx context.Context, mid int64, hs map[int64]*model.History) (err error)
- func (d *Dao) AidsMap(ctx context.Context, mid int64, aids []int64) (his map[int64]*model.History, err error)
- func (d *Dao) Bangumis(c context.Context, mid int64, epid []int64) (map[int64]*model.Bangumi, error)
- func (d *Dao) BangumisByAids(c context.Context, mid int64, aids []int64, realIP string) (map[int64]*model.BangumiSeason, error)
- func (d *Dao) Cache(c context.Context, mid int64, aids []int64) (amap map[int64]*model.History, miss []int64, err error)
- func (d *Dao) CacheMap(c context.Context, mid int64) (amap map[int64]*model.History, err error)
- func (d *Dao) Clear(ctx context.Context, mid int64) (err error)
- func (d *Dao) ClearCache(c context.Context, mid int64) (err error)
- func (d *Dao) Close()
- func (d *Dao) DelAids(ctx context.Context, mid int64, aids []int64) (err error)
- func (d *Dao) DelCache(c context.Context, mid int64, aids []int64) (err error)
- func (d *Dao) Delete(ctx context.Context, mid int64, his []*model.History) (err error)
- func (d *Dao) ExpireCache(c context.Context, mid int64) (bool, error)
- func (d *Dao) ExpireIndexCache(c context.Context, mid int64) (bool, error)
- func (d *Dao) IndexCache(c context.Context, mid int64, start, end int) (aids []int64, err error)
- func (d *Dao) IndexCacheByTime(c context.Context, mid int64, start int64) (aids []int64, err error)
- func (d *Dao) InfoShadow(ctx context.Context, mid int64) (sw int64, err error)
- func (d *Dao) Map(ctx context.Context, mid int64) (his map[string]*model.History, err error)
- func (d *Dao) Merge(c context.Context, mid int64, msg interface{}) (err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) PingRedis(c context.Context) (err error)
- func (d *Dao) PlayPro(c context.Context, key string, msg interface{}) (err error)
- func (d *Dao) ProPub(c context.Context, key string, msg interface{}) (err error)
- func (d *Dao) PushFirstQueue(c context.Context, mid, aid, now int64) (err error)
- func (d *Dao) SetInfoShadow(ctx context.Context, mid, value int64) (err error)
- func (d *Dao) SetShadowCache(c context.Context, mid, value int64) (err error)
- func (d *Dao) ShadowCache(c context.Context, mid int64) (value int64, err error)
- func (d *Dao) TrimCache(c context.Context, mid int64, limit int) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao dao.
func (*Dao) AddCacheMap ¶
AddCacheMap add the user State to redis.
func (*Dao) AidsMap ¶
func (d *Dao) AidsMap(ctx context.Context, mid int64, aids []int64) (his map[int64]*model.History, err error)
AidsMap get all Historys from hbase by aids.
func (*Dao) Bangumis ¶
func (d *Dao) Bangumis(c context.Context, mid int64, epid []int64) (map[int64]*model.Bangumi, error)
Bangumis .
func (*Dao) BangumisByAids ¶
func (d *Dao) BangumisByAids(c context.Context, mid int64, aids []int64, realIP string) (map[int64]*model.BangumiSeason, error)
BangumisByAids .
func (*Dao) Cache ¶
func (d *Dao) Cache(c context.Context, mid int64, aids []int64) (amap map[int64]*model.History, miss []int64, err error)
Cache return the user State from redis.
func (*Dao) ClearCache ¶
ClearCache clear the user State redis.
func (*Dao) ExpireCache ¶
ExpireCache expire the user State redis.
func (*Dao) ExpireIndexCache ¶
ExpireIndexCache expire index cache.
func (*Dao) IndexCache ¶
IndexCache get history from redis.
func (*Dao) IndexCacheByTime ¶
IndexCacheByTime get aids from redis where score.
func (*Dao) InfoShadow ¶
InfoShadow return the user switch from hbase.
func (*Dao) PushFirstQueue ¶
PushFirstQueue push first view record every day into kafka.
func (*Dao) SetInfoShadow ¶
SetInfoShadow set the user switch to hbase.
func (*Dao) SetShadowCache ¶
SetShadowCache set the user switch to redis.
func (*Dao) ShadowCache ¶
ShadowCache return user switch redis.
Click to show internal directories.
Click to hide internal directories.