Documentation
¶
Index ¶
- func StartBackgroundScorer(ctx context.Context, store *postgres.Store, gh ghclient.Client, version string) func()
- func StartIngestLoop(ctx context.Context, run IngestFunc, interval time.Duration) func()
- func StartQuotaSampler(ctx context.Context, store *postgres.Store, pool *ghclient.TokenPool) func()
- type IngestFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartBackgroundScorer ¶
func StartBackgroundScorer(ctx context.Context, store *postgres.Store, gh ghclient.Client, version string) func()
StartBackgroundScorer runs a continuous scoring loop that pauses when aggregate token quota drops below the configured threshold. Returns a cancel function to stop the loop.
func StartIngestLoop ¶
func StartIngestLoop(ctx context.Context, run IngestFunc, interval time.Duration) func()
StartIngestLoop runs the given function immediately, then on a ticker interval. If interval is 0, it reads INGEST_INTERVAL_SEC (default 600s). Returns a cancel function to stop the loop.
Types ¶
type IngestFunc ¶
IngestFunc is the function signature for a single ingest run.
Click to show internal directories.
Click to hide internal directories.