Discover Packages
github.com/yrj2011/my-test-infra
prow
tide
history
package
Version:
v0.0.0-...-97238d6
Opens a new window with list of versions in this module.
Published: May 29, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package history provides an append only, size limited log of recent actions
that Tide has taken for each subpool.
ByNum implements sort.Interface for []PRMeta to sort by ascending PR number.
History uses a `*recordLog` per pool to store a record of recent actions that
Tide has taken. Using a log per pool ensure that history is retained
for inactive pools even if other pools are very active.
New creates a new History struct with the specificed recordLog size limit.
AllRecords generates a map from pool key -> sorted records for the pool.
Record appends an entry to the recordlog specified by the poolKey.
ServeHTTP serves a JSON mapping from pool key -> sorted records for the pool.
type PRMeta struct {
Num int `json:"num"`
Author string `json:"author"`
Title string `json:"title"`
SHA string `json:"SHA"`
}
PRMeta stores metadata about a PR at the time of the action.
type Record struct {
Time time .Time `json:"time"`
Action string `json:"action"`
BaseSHA string `json:"baseSHA,omitempty"`
Target []PRMeta `json:"target,omitempty"`
Err string `json:"err,omitempty"`
}
Record is an entry describing one action that Tide has taken (e.g. TRIGGER or MERGE).
Source Files
¶
Click to show internal directories.
Click to hide internal directories.