Documentation
¶
Index ¶
- Constants
- func CrossVCSTTL() time.Duration
- func CrossVCSTimeout() time.Duration
- func DebugEnabled() bool
- func GetEnv(key, fallback string) string
- func GetEnvAsDuration(key string, fallback time.Duration) time.Duration
- func GetEnvAsFloat(key string, fallback float64) float64
- func GetEnvAsInt(key string, fallback int) int
- func GetEnvBool(key string) bool
- func GetEnvBoolDefault(key string, fallback bool) bool
- func OSSFTTL() time.Duration
- func OSSFTimeout() time.Duration
- func PublisherTTL() time.Duration
- func PublisherTimeout() time.Duration
- func PublisherTopLimit() int
- func RepoListLimit() int
- func RepoSummaryTTL() time.Duration
- func SecurityCreditLimit() int
- func SecurityCreditTTL() time.Duration
- func SecurityCreditsEnabled() bool
- func StackOverflowAPIKey() string
- func StackOverflowTTL() time.Duration
- func StackOverflowTimeout() time.Duration
Constants ¶
const ArchivePublishDelay = 2 * time.Hour
ArchivePublishDelay is the expected lag between an hour ending and GH Archive publishing the corresponding file (~2 hours).
Variables ¶
This section is empty.
Functions ¶
func CrossVCSTTL ¶
CrossVCSTTL returns the freshness window for cached cross-VCS match summaries. Override via DEVTRACE_CROSS_VCS_TTL.
func CrossVCSTimeout ¶
CrossVCSTimeout returns the per-call timeout for the forges client. Override via DEVTRACE_CROSS_VCS_TIMEOUT.
func DebugEnabled ¶
func DebugEnabled() bool
func GetEnvAsDuration ¶
GetEnvAsDuration parses the env var as a Go duration; falls back to the default on absent or invalid values.
func GetEnvAsFloat ¶
func GetEnvAsInt ¶
func GetEnvBool ¶
func GetEnvBoolDefault ¶
GetEnvBoolDefault returns the env var as a bool, falling back to the provided default when unset. Use this for feature flags that default to ON (operator must opt out) rather than the default-OFF GetEnvBool. Accepted truthy/falsy values are the standard pairs: "true"/"false" and "1"/"0", case-insensitive.
func OSSFTTL ¶
OSSFTTL returns the freshness window for cached OSSF Scorecard rows. Override via DEVTRACE_OSSF_TTL.
func OSSFTimeout ¶
OSSFTimeout returns the per-call timeout for the OSSF Scorecard HTTP client. Override via DEVTRACE_OSSF_TIMEOUT.
func PublisherTTL ¶
PublisherTTL returns the freshness window for cached publisher profiles. Override via DEVTRACE_PUBLISHER_TTL.
func PublisherTimeout ¶
PublisherTimeout returns the per-call timeout for the publisher HTTP clients. Override via DEVTRACE_PUBLISHER_TIMEOUT.
func PublisherTopLimit ¶
func PublisherTopLimit() int
PublisherTopLimit returns the cap on packages surfaced in the top list. Override via DEVTRACE_PUBLISHER_TOP_LIMIT.
func RepoListLimit ¶
func RepoListLimit() int
RepoListLimit returns the cap on how many of a contributor's repositories the owned-repos aggregator pulls from GitHub on a single refresh. Override via DEVTRACE_REPO_LIST_LIMIT. Three pages of 100 covers nearly all real users; high-volume accounts get the most-recently-pushed slice.
func RepoSummaryTTL ¶
RepoSummaryTTL returns the freshness window for cached owned-repos aggregates. Override via DEVTRACE_REPO_SUMMARY_TTL (Go duration format, e.g. "12h", "30m"). Beyond this age the next score request triggers a re-fetch from the GitHub /users/{u}/repos endpoint.
func SecurityCreditLimit ¶
func SecurityCreditLimit() int
SecurityCreditLimit returns the cap on how many GHSA credits the security-advisory fetcher pulls from GitHub on a single refresh. Override via DEVTRACE_SECURITY_CREDIT_LIMIT.
func SecurityCreditTTL ¶
SecurityCreditTTL returns the freshness window for cached GHSA security-advisory credits. Override via DEVTRACE_SECURITY_CREDIT_TTL.
func SecurityCreditsEnabled ¶
func SecurityCreditsEnabled() bool
SecurityCreditsEnabled gates live GHSA-credit fetching. Defaults OFF because the v0.21 GraphQL query (User.securityAdvisoryCredits) hits a non-existent field and there is no cheap alternative API yet. Flip via DEVTRACE_SECURITY_CREDITS_ENABLED=true once a viable fetch path exists. The cache lookup and UI render still run when disabled, so pre-existing rows surface and re-enabling is a no-op for callers.
func StackOverflowAPIKey ¶
func StackOverflowAPIKey() string
StackOverflowAPIKey returns the optional Stack Exchange API key. Empty string runs against the unauthenticated 300/day per-IP quota; providing a key (DEVTRACE_SO_API_KEY) lifts that to 10000/day.
func StackOverflowTTL ¶
StackOverflowTTL returns the freshness window for cached SO profiles. Override via DEVTRACE_SO_TTL.
func StackOverflowTimeout ¶
StackOverflowTimeout returns the per-call timeout for the SE Data API client. Override via DEVTRACE_SO_TIMEOUT.
Types ¶
This section is empty.