Documentation
¶
Overview ¶
Package poller runs each view's GitHub query on an interval.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
func New ¶
func New(s Searcher, views []config.View, interval time.Duration, limitFor func(config.View) int) *Poller
New returns a poller for views. limitFor gives each view's PR limit; nil uses config.DefaultMaxPRs for every view.
func (*Poller) PollNow ¶
func (p *Poller) PollNow()
PollNow asks Run to start a new round immediately. It never blocks.
type Result ¶
type Result struct {
View string
Query string // the query that produced this result
PRs []github.PR
Err error
At time.Time
// Truncated reports that GitHub has more matches than the view's limit.
Truncated bool
}
Result is one view's poll outcome. Err with nil PRs is a failed poll and the caller keeps whatever it showed before; Err with PRs is a warning.
Click to show internal directories.
Click to hide internal directories.