ugc

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry(callback func() error, retry int, sleep time.Duration) (err error)

Retry . retry one function until no error

Types

type Service

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

Service is show service.

func New

func New(c *conf.Config) (s *Service)

New inits the ugc service

func (*Service) ArcHandle

func (s *Service) ArcHandle(arcMsg *ugcmdl.ArcMsg)

ArcHandle treats the archive notify-T message to update the DB if there is any change

func (*Service) Close

func (s *Service) Close()

Close close the services

func (*Service) InitUpper

func (s *Service) InitUpper(mid int64) (err error)

InitUpper takes the upper's archive & videos, load them into our DB

func (*Service) UgcDbus

func (s *Service) UgcDbus(msg *databus.Message)

UgcDbus def.

func (*Service) UpArchives

func (s *Service) UpArchives(mid int64, pn int, ps int) (match map[int64]*arccli.Arc, aids []int64, err error)

UpArchives picks one page of the up's archives

func (*Service) ZoneIdx

func (s *Service) ZoneIdx()

ZoneIdx finds out all the passed seasons in DB and then arrange them in a sorted set in Redis

Jump to

Keyboard shortcuts

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