Documentation ¶
Index ¶
- Constants
- func AddCommitsData(ctx context.Context, db *pgxpool.Pool, windowLength int) (context.Context, error)
- func GetActualWindowLength(ctx context.Context) int
- func GetCommitToIdxMap(ctx context.Context) map[schema.CommitID]int
- func GetFirstCommitID(ctx context.Context) schema.CommitID
- func GetFirstTileID(ctx context.Context) schema.TileID
- func GetLastTileID(ctx context.Context) schema.TileID
- func GetQualifiedCL(ctx context.Context) string
- func GetQualifiedPS(ctx context.Context) string
- func GetQuery(ctx context.Context) query.Search
- func ToJSON(obj interface{}) (string, error)
- type DigestWithTraceAndGrouping
- type FilterSets
- type GroupingDigestKey
- type SearchContextKey
Constants ¶
View Source
const ( ActualWindowLengthKey = SearchContextKey("actualWindowLengthKey") CommitToIdxKey = SearchContextKey("commitToIdxKey") FirstCommitIDKey = SearchContextKey("firstCommitIDKey") FirstTileIDKey = SearchContextKey("firstTileIDKey") LastTileIDKey = SearchContextKey("lastTileIDKey") QualifiedCLIDKey = SearchContextKey("qualifiedCLIDKey") QualifiedPSIDKey = SearchContextKey("qualifiedPSIDKey") QueryKey = SearchContextKey("queryKey") )
Variables ¶
This section is empty.
Functions ¶
func AddCommitsData ¶
func AddCommitsData(ctx context.Context, db *pgxpool.Pool, windowLength int) (context.Context, error)
addCommitsData finds the current sliding window of data (The last N commits) and adds the derived data to the given context and returns it.
func GetActualWindowLength ¶
func GetQualifiedCL ¶
func GetQualifiedPS ¶
Types ¶
type DigestWithTraceAndGrouping ¶
type DigestWithTraceAndGrouping struct { TraceID schema.TraceID GroupingID schema.GroupingID Digest schema.DigestBytes // OptionsID will be set for CL data only; for primary data we have to look it up from a // different table and the options could change over time. OptionsID schema.OptionsID }
type FilterSets ¶
type GroupingDigestKey ¶
GroupingDigestKey provides a struct to use as a key combination of a grouping ID and a digest.
type SearchContextKey ¶
type SearchContextKey string
To avoid piping a lot of info about the commits in the most recent window through all the functions in the search pipeline, we attach them as values to the context.
Click to show internal directories.
Click to hide internal directories.