Documentation ¶
Index ¶
- Constants
- func ByBlameKey(corpus string) string
- func NewCacheDataProvider(db *pgxpool.Pool, corpora []string, commitWindow int, sqlQuery string, ...) cacheDataProvider
- func UnignoredKey(corpus string) string
- type SearchCacheData
- type SearchCacheManager
- func (s SearchCacheManager) GetByBlameData(ctx context.Context, firstCommitId string, corpus string) ([]SearchCacheData, error)
- func (s SearchCacheManager) GetUnignoredTracesData(ctx context.Context, firstCommitId string, corpus string) ([]SearchCacheData, error)
- func (s SearchCacheManager) RunCachePopulation(ctx context.Context) error
- type SearchCacheType
Constants ¶
View Source
const ( // This query collects untriaged image digests within the specified commit window for the given // corpus where an ignore rule is not applied. This data is used when the user wants to see // a list of untriaged digests for the specific corpus in the UI. ByBlameQuery = `` /* 533-byte string literal not displayed */ // This query returns all traces for the given corpus which do not have any corresponding ignore rule. UnignoredQuery = `` /* 141-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func ByBlameKey ¶
func NewCacheDataProvider ¶
func NewCacheDataProvider(db *pgxpool.Pool, corpora []string, commitWindow int, sqlQuery string, cacheKeyFunc func(string) string) cacheDataProvider
NewCacheDataProvider returns a new instance of the cacheDataProvider struct.
func UnignoredKey ¶
Types ¶
type SearchCacheData ¶
type SearchCacheData struct { TraceID schema.TraceID `json:"traceID"` GroupingID schema.GroupingID `json:"groupingID"` Digest schema.DigestBytes `json:"digest"` }
SearchCacheData provides a struct to hold data for the entry in by blame cache.
type SearchCacheManager ¶
type SearchCacheManager struct {
// contains filtered or unexported fields
}
SearchCacheManager provides a struct to handle the cache operations for gold search.
func New ¶
func New(cacheClient cache.Cache, db *pgxpool.Pool, corpora []string, commitWindow int) *SearchCacheManager
New returns a new instance of the SearchCacheManager.
func (SearchCacheManager) GetByBlameData ¶
func (s SearchCacheManager) GetByBlameData(ctx context.Context, firstCommitId string, corpus string) ([]SearchCacheData, error)
GetByBlameData returns the by blame data for the given corpus from cache.
func (SearchCacheManager) GetUnignoredTracesData ¶
func (s SearchCacheManager) GetUnignoredTracesData(ctx context.Context, firstCommitId string, corpus string) ([]SearchCacheData, error)
GetUnignoredTracesData returns the unignored traces data for the given corpus from cache.
func (SearchCacheManager) RunCachePopulation ¶
func (s SearchCacheManager) RunCachePopulation(ctx context.Context) error
RunCachePopulation gets the cache data from the providers and stores it in the cache instance.
type SearchCacheType ¶
type SearchCacheType int
const ( // ByBlame_Corpus denotes the cache type for untriaged images by commits for a given corpus. ByBlame_Corpus SearchCacheType = iota // Unignored_Corpus denotes the cache type for traces without ignore rules. Unignored_Corpus )
Click to show internal directories.
Click to hide internal directories.