push

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: 17 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 .

func New

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

New creates a dao instance.

func (*Dao) CallPush

func (d *Dao) CallPush(ctx context.Context, platform string, msg string, ip string) (err error)

CallPush calls the push server api

func (*Dao) CallRefresh

func (d *Dao) CallRefresh(ctx context.Context) (err error)

CallRefresh picks ip addrs from discovery, and call grpc method

func (*Dao) DiffFinish

func (d *Dao) DiffFinish(c context.Context, resID string) (res bool, err error)

DiffFinish checks whether the resource's diff calculation has been finished or not

func (*Dao) Platform

func (d *Dao) Platform(c context.Context, resID string) (res []string, err error)

Platform picks the mobi_app value to distinguish the platform to push

func (*Dao) PushMsg

func (d *Dao) PushMsg(c context.Context, resID string) (res string, err error)

PushMsg combines the resource pool info to prepare the msg to call PUSH

func (*Dao) ZRem

func (d *Dao) ZRem(c context.Context, resID string) (err error)

ZRem ZREM trim from trim queue.

func (*Dao) ZrangeList

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

ZrangeList picks up all the to push resIDs, ctime

Jump to

Keyboard shortcuts

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