Versions in this module Expand all Collapse all v1 v1.0.0 Mar 6, 2026 Changes in this version + func HTTPMiddleware(next http.Handler) http.Handler + func Handler() http.Handler + func RecordBranchesIndexed(branchCount int, success bool) + func RecordCodeHostRequest(hostType, endpoint string, duration time.Duration, success bool) + func RecordError(category, errorType string) + func RecordGitClone(duration time.Duration, success bool) + func RecordGitFetch(duration time.Duration, success bool) + func RecordIndexFailure(reason string) + func RecordJob(jobType string, duration time.Duration, success bool) + func RecordOrphanedActiveMarkerRecovered() + func RecordRateLimit(allowed bool) + func RecordReplace(filesModified int, success bool) + func RecordRepoIndex(duration time.Duration, success bool) + func RecordRepoSize(sizeBytes int64, success bool) + func RecordRepoSync(duration time.Duration, success bool) + func RecordSearch(searchType string, duration time.Duration, resultCount int) + func SetActiveIndexRepos(count int) + func SetCodeHostRateLimit(hostType string, remaining int, resetTime time.Time) + func SetConnectionCounts(counts map[string]int) + func SetDBConnections(open, inUse int) + func SetJobQueueCounts(counts map[string]int) + func SetOrphanedTempFiles(count int) + func SetRateLimitBuckets(count int) + func SetRedisConnections(open int) + func SetRepositoryCounts(counts map[string]int) + func SetStuckIndexJobs(duration string, count int) + func SetZoektStats(shards int, indexSizeBytes int64) + type Collector struct + func NewCollector(db DBPool, redis *redis.Client, indexPath string, interval time.Duration) *Collector + func (c *Collector) Start(ctx context.Context) + func (c *Collector) Stop() + type DBPool interface + Query func(ctx context.Context, sql string, args ...any) (Rows, error) + Stats func() PoolStats + type DBPoolAdapter struct + QueryFunc func(ctx context.Context, sql string, args ...any) (Rows, error) + StatsFunc func() PoolStats + func (a *DBPoolAdapter) Query(ctx context.Context, sql string, args ...any) (Rows, error) + func (a *DBPoolAdapter) Stats() PoolStats + type PoolStats struct + Idle int + InUse int + MaxOpenConnections int + OpenConnections int + type Rows interface + Close func() + Err func() error + Next func() bool + Scan func(dest ...any) error