Documentation
¶
Index ¶
- type AMQPConfig
- type BackfillConfig
- type Config
- type CopilotConfig
- type CopilotEnterpriseConfig
- type GitHubConfig
- type GitHubOrgConfig
- type HealthConfig
- type LOCConfig
- type LeaderElectionConfig
- type MetricsConfig
- type RateLimitConfig
- type RetryConfig
- type ServerConfig
- type StoreConfig
- type TelemetryConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQPConfig ¶
type AMQPConfig struct {
URL string `yaml:"url"`
Exchange string `yaml:"exchange"`
Queue string `yaml:"queue"`
DLQ string `yaml:"dlq"`
}
AMQPConfig configures RabbitMQ/AMQP connectivity.
type BackfillConfig ¶
type BackfillConfig struct {
Enabled bool
MaxMessageAge time.Duration
ConsumerCount int
RequeueDelays []time.Duration
CoalesceWindow time.Duration
DedupTTL time.Duration
MaxEnqueuesPerOrgPerMinute int
}
BackfillConfig configures backfill queue behavior.
type Config ¶
type Config struct {
Server ServerConfig
Metrics MetricsConfig
LeaderElection LeaderElectionConfig
GitHub GitHubConfig
Copilot CopilotConfig
RateLimit RateLimitConfig
Retry RetryConfig
LOC LOCConfig
Backfill BackfillConfig
AMQP AMQPConfig
Store StoreConfig
Health HealthConfig
Telemetry TelemetryConfig
}
Config is the root application configuration.
type CopilotConfig ¶ added in v1.2.0
type CopilotConfig struct {
Enabled bool
ScrapeInterval time.Duration
RequestTimeout time.Duration
DownloadTimeout time.Duration
IncludeOrg28d bool
IncludeOrgUsers28d bool
IncludeEnterprise28d bool
IncludeEnterpriseUsers28d bool
IncludeBreakdownIDE bool
IncludeBreakdownFeature bool
IncludeBreakdownLanguage bool
IncludeBreakdownModel bool
IncludePullRequestActivity bool
UserLabelMode string
EmitDayLabel bool
MaxRecordsPerReport int
MaxUsersPerReport int
RefreshIfReportUnchanged bool
Enterprise CopilotEnterpriseConfig
}
CopilotConfig configures optional GitHub Copilot usage scraping.
type CopilotEnterpriseConfig ¶ added in v1.2.0
type CopilotEnterpriseConfig struct {
Enabled bool
Slug string
AppID int64
InstallationID int64
PrivateKeyPath string
}
CopilotEnterpriseConfig configures enterprise-scope Copilot scraping.
type GitHubConfig ¶
type GitHubConfig struct {
APIBaseURL string
RequestTimeout time.Duration
UnhealthyFailureThreshold int
UnhealthyCooldown time.Duration
Orgs []GitHubOrgConfig
}
GitHubConfig configures GitHub API interactions.
type GitHubOrgConfig ¶
type GitHubOrgConfig struct {
Org string `yaml:"org"`
AppID int64 `yaml:"app_id"`
InstallationID int64 `yaml:"installation_id"`
PrivateKeyPath string `yaml:"private_key_path"`
ScrapeInterval time.Duration
RepoAllowlist []string `yaml:"repo_allowlist"`
PerOrgConcurrency int `yaml:"per_org_concurrency"`
}
GitHubOrgConfig configures a single organization scrape target.
type HealthConfig ¶
HealthConfig configures health probe behavior.
type LOCConfig ¶
type LOCConfig struct {
Source string
RefreshInterval time.Duration
FallbackEnabled bool
FallbackMaxCommitsPerRepoPerWeek int
FallbackMaxCommitDetailCallsPerOrgPerHour int
LargeRepoZeroDetectionWindows int
LargeRepoCooldown time.Duration
}
LOCConfig configures lines-of-code metrics.
type LeaderElectionConfig ¶
type LeaderElectionConfig struct {
Enabled bool
Namespace string
LeaseName string
LeaseDuration time.Duration
RenewDeadline time.Duration
RetryPeriod time.Duration
}
LeaderElectionConfig contains leader election settings.
type MetricsConfig ¶
type MetricsConfig struct {
Topology string `yaml:"topology"`
ScrapeServiceDNS string `yaml:"scrape_service_dns"`
}
MetricsConfig contains scrape topology settings.
type RateLimitConfig ¶
type RateLimitConfig struct {
MinRemainingThreshold int
MinResetBuffer time.Duration
SecondaryLimitBackoff time.Duration
}
RateLimitConfig configures rate-limit controls.
type RetryConfig ¶
type RetryConfig struct {
MaxAttempts int
InitialBackoff time.Duration
MaxBackoff time.Duration
Jitter bool
}
RetryConfig configures retries.
type ServerConfig ¶
type ServerConfig struct {
ListenAddr string `yaml:"listen_addr"`
LogLevel string `yaml:"log_level"`
}
ServerConfig contains HTTP server settings.
type StoreConfig ¶
type StoreConfig struct {
Backend string
RedisMode string
RedisAddr string
RedisMasterSet string
RedisSentinelAddrs []string
RedisPassword string
RedisDB int
Retention time.Duration
MetricRefreshInterval time.Duration
IndexShards int
ExportCacheMode string
MaxSeriesBudget int
}
StoreConfig configures metric storage.