Documentation
¶
Overview ¶
internal/worker/pool.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessFunc ¶
ProcessFunc processes a single repository and returns its stats.
type ProgressFunc ¶
ProgressFunc is called after each repository is processed.
type Result ¶
Result holds the outcome of processing a single repository.
func RunWithProgress ¶
func RunWithProgress(ctx context.Context, repos []model.Repo, concurrency int, process ProcessFunc, onProgress ProgressFunc) []Result
RunWithProgress processes repos concurrently with an optional progress callback.
type TrendsProcessFunc ¶ added in v0.5.0
type TrendsProcessFunc func(ctx context.Context, repo model.Repo) (map[string]*model.RepoStats, error)
TrendsProcessFunc processes a single repository and returns stats per period.
type TrendsResult ¶ added in v0.5.0
type TrendsResult struct {
Repo model.Repo
Snapshots map[string]*model.RepoStats // period label -> stats
Err error
}
TrendsResult holds the outcome of processing a single repository across time periods.
func RunTrends ¶ added in v0.5.0
func RunTrends(ctx context.Context, repos []model.Repo, concurrency int, process TrendsProcessFunc, onProgress ProgressFunc) []TrendsResult
RunTrends processes repos concurrently, where each repo produces multiple period snapshots.
Click to show internal directories.
Click to hide internal directories.