MCPcopy Create free account
hub / github.com/cortexproject/cortex / ReuseLastUser

Method ReuseLastUser

pkg/scheduler/queue/queue.go:35–40  ·  view source on GitHub ↗

Modify index to start iteration on the same user, for which last queue was returned.

()

Source from the content-addressed store, hash-verified

33
34// Modify index to start iteration on the same user, for which last queue was returned.
35func (ui UserIndex) ReuseLastUser() UserIndex {
36 if ui.last >= 0 {
37 return UserIndex{last: ui.last - 1}
38 }
39 return ui
40}
41
42// FirstUser returns UserIndex that starts iteration over user queues from the very first user.
43func FirstUser() UserIndex {

Callers 2

QuerierLoopMethod · 0.80
ProcessMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected