dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromError

func PromError(name string, format string, args ...interface{})

PromError stat and log.

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao dao.

func New

func New(c *conf.Config) (d *Dao)

New dao new.

func (*Dao) Close

func (dao *Dao) Close()

Close close memcache resource.

func (*Dao) Hot

func (d *Dao) Hot(c context.Context) (res map[int32][]int64, err error)

Hot Second type hot tag ids.

func (*Dao) Live

func (d *Dao) Live(c context.Context) (count int, err error)

Live gets live dynamic count

func (*Dao) Ping

func (dao *Dao) Ping(c context.Context) (err error)

Ping check connection success.

func (*Dao) RegionArcs

func (d *Dao) RegionArcs(c context.Context, rid int32, remoteIP string) (aids []int64, total int, err error)

RegionArcs get new dynamic by bigData API.

func (*Dao) RegionCache

func (d *Dao) RegionCache(c context.Context) (rs map[int32][]int64)

RegionCache get region archive from cache.

func (*Dao) RegionTagArcs

func (d *Dao) RegionTagArcs(c context.Context, rid int32, tagID int64, remoteIP string) (aids []int64, err error)

RegionTagArcs get new dynamic by bigData API.

func (*Dao) Rids

func (d *Dao) Rids(c context.Context) (res []int32, err error)

Rids first type ids.

func (*Dao) SetRegionCache

func (d *Dao) SetRegionCache(c context.Context, regionArcs map[int32][]int64) (err error)

SetRegionCache set region archive to cache.

func (*Dao) SetTagCache

func (d *Dao) SetTagCache(c context.Context, regionTagArcs map[string][]int64) (err error)

SetTagCache set region tag archvie to cache.

func (*Dao) TagCache

func (d *Dao) TagCache(c context.Context) (rs map[string][]int64)

TagCache get region tag archive from cache.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL