redis

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: 6 Imported by: 0

Documentation

Index

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 is redis dao.

func New

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

New new a archive dao.

func (*Dao) AddArcClick

func (d *Dao) AddArcClick(c context.Context, aid int64, click int) (err error)

AddArcClick add archive click into redis

func (*Dao) AddFilename

func (d *Dao) AddFilename(c context.Context, filename string) (err error)

AddFilename set filename expire time

func (*Dao) ArcClick

func (d *Dao) ArcClick(c context.Context, aid int64) (click int, err error)

ArcClick find archive click from redis

func (*Dao) Close

func (d *Dao) Close() (err error)

Close close the redis connection

func (*Dao) DelFilename

func (d *Dao) DelFilename(c context.Context, filename string) (err error)

DelFilename set filename expire time

func (*Dao) DelMonitorCache

func (d *Dao) DelMonitorCache(c context.Context, aid int64) (err error)

DelMonitorCache del monitor cache

func (*Dao) PopFail

func (d *Dao) PopFail(c context.Context) (bs []byte, err error)

PopFail lpop fail item from redis

func (*Dao) PopQueue

func (d *Dao) PopQueue(c context.Context, queue string) (bs []byte, err error)

PopQueue lpop fail item from redis

func (*Dao) PushFail

func (d *Dao) PushFail(c context.Context, a interface{}) (err error)

PushFail rpush fail item to redis

func (*Dao) PushQueue

func (d *Dao) PushQueue(c context.Context, a interface{}, queue string) (err error)

PushQueue rpush fail item to redis

func (*Dao) SetMonitorCache

func (d *Dao) SetMonitorCache(c context.Context, aid int64) (had bool, err error)

SetMonitorCache set monitor cache

Jump to

Keyboard shortcuts

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