Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertEndmark(str string) (err error)
- func ConvertRankToStr(tier riotmodel.TIER, div uint) (string, string)
- func ConvertStrToRank(tierStr, divStr string) (riotmodel.TIER, uint)
- func Run(ctx context.Context)
- type DBResult
- type Pumper
- func (p *Pumper) FetchEntryBySumnID(sumnID string, loc riotmodel.LOCATION)
- func (p *Pumper) FetchMatchByID(req *scheduler.Task, host, matchID string) (res *riotmodel.MatchDB)
- func (p *Pumper) FetchMatchBySumnID(sumnID string, loc riotmodel.LOCATION)
- func (p *Pumper) LoadAll()
- func (p *Pumper) LoadSingleSummoner(name, loc string) (res *riotmodel.SummonerDTO)
- func (p *Pumper) Schedule()
- func (p *Pumper) StartEngine()
- func (p *Pumper) TaskHandlers(body []byte) error
- func (p *Pumper) UpdateAll()
- func (p *Pumper) UpdateEntries()
- func (p *Pumper) UpdateMatch()
- func (p *Pumper) UpdateSumoner()
- type Setup
- func WithAreaLoc(areas ...riotmodel.AREA) Setup
- func WithContext(ctx context.Context) Setup
- func WithEndMark(tier riotmodel.TIER, div uint) Setup
- func WithLoc(locs ...riotmodel.LOCATION) Setup
- func WithMaxMatchCount(size int) Setup
- func WithQues(ques ...riotmodel.QUECODE) Setup
- func WithToken(token string) Setup
- type Strategy
Constants ¶
View Source
const ( EntryTypeKey = "entry" SummonerTypeKey = "sum" MatchTypeKey = "match" )
Variables ¶
Functions ¶
func ConvertEndmark ¶
Types ¶
type Pumper ¶
type Pumper struct { Exit chan struct{} // contains filtered or unexported fields }
func (*Pumper) FetchEntryBySumnID ¶
func (*Pumper) FetchMatchByID ¶
func (*Pumper) FetchMatchBySumnID ¶
func (*Pumper) LoadSingleSummoner ¶
func (p *Pumper) LoadSingleSummoner(name, loc string) (res *riotmodel.SummonerDTO)
func (*Pumper) StartEngine ¶
func (p *Pumper) StartEngine()
func (*Pumper) TaskHandlers ¶
func (*Pumper) UpdateEntries ¶
func (p *Pumper) UpdateEntries()
func (*Pumper) UpdateMatch ¶
func (p *Pumper) UpdateMatch()
func (*Pumper) UpdateSumoner ¶
func (p *Pumper) UpdateSumoner()
type Setup ¶
type Setup func(*Strategy) // Strategy的配置选项
func WithAreaLoc ¶
WithAreaLoc (riotmodel.LOC_ALL) WithAreaLoc (riotmodel.LOC_AMERICAS,riotmodel.LOC_ASIA)
func WithContext ¶
func WithEndMark ¶
WithEndMark (riotmodel.DIAMOND,1) WithEndMark (riotmodel.IRON,4)
func WithMaxMatchCount ¶
type Strategy ¶
type Strategy struct { Token string // registryURL string Ctx context.Context Loc []riotmodel.LOCATION // 地区列表 Que []riotmodel.QUECODE // 队列类型列表 TestEndMark1 riotmodel.TIER // 测试用终止标记 TestEndMark2 uint // 测试用终止标记 MaxSize int // Task最大切割尺寸 MaxMatchCount int // 最大比赛场次 Retry uint // 任务重试次数 LifeTime time.Duration // 缓存生命周期 }
Click to show internal directories.
Click to hide internal directories.