Documentation ¶
Overview ¶
Package util has convenience functions for use throughout TestGrid.
Index ¶
- func Progress(ctx context.Context, log logrus.FieldLogger, every time.Duration, total int, ...) func(int)
- type Queue
- func (q *Queue) Fix(name string, when time.Time, later bool) error
- func (q *Queue) FixAll(whens map[string]time.Time, later bool) error
- func (q *Queue) Init(names []string, when time.Time)
- func (q *Queue) Send(ctx context.Context, receivers chan<- string, frequency time.Duration) error
- func (q *Queue) Status() (int, *string, time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Queue ¶ added in v0.0.104
type Queue struct {
// contains filtered or unexported fields
}
Queue can send names to receivers at a specific frequency.
Also contains the ability to modify the next time to send names. First call must be to Init(). Exported methods are safe to call concurrently.
func (*Queue) Fix ¶ added in v0.0.104
Fix the next time to send the group to receivers.
If later is set then it will move out the next update time, otherwise it will only reduce it.
func (*Queue) FixAll ¶ added in v0.0.104
FixAll will fix multiple groups inside a single critical section.
If later is set then it will move out the next update time, otherwise it will only reduce it.
func (*Queue) Init ¶ added in v0.0.104
Init (or reinit) the queue with the specified groups, which should be updated at frequency.