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
- 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 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.