Report inbox: /api/reports in its own bounded reports.db, dashboard Reports page (list, filter, triage, copy as text)
Build and Push Docker Image / build (push) Failing after 1m20s
Build and Push Docker Image / build (push) Failing after 1m20s
This commit is contained in:
@@ -23,6 +23,11 @@ type Config struct {
|
||||
DBPathOverride string // META_CORE_DB_PATH; empty = <MetaCorePath>/db/meta-core.db (truth)
|
||||
CachePathOverride string // META_CORE_CACHE_PATH; empty = <MetaCorePath>/db-cache/cache.db
|
||||
|
||||
// Report inbox (internal/reports): its own SQLite file, bounded.
|
||||
ReportsPathOverride string // META_CORE_REPORTS_DB_PATH; empty = <MetaCorePath>/db/reports.db
|
||||
ReportsMax int // META_CORE_REPORTS_MAX: reports kept (default 5000; closed evicted first)
|
||||
ReportsMaxMB int // META_CORE_REPORTS_MAX_MB: total body size kept, MiB (default 256)
|
||||
|
||||
// HTTP API configuration
|
||||
HTTPPort int // HTTP API port (default: 9000)
|
||||
HTTPHost string // HTTP API host (default: "0.0.0.0" — meta-core always runs in a container and must answer siblings)
|
||||
@@ -63,6 +68,9 @@ func Load() *Config {
|
||||
PublicURL: getEnv("META_CORE_PUBLIC_URL", ""),
|
||||
DBPathOverride: getEnv("META_CORE_DB_PATH", ""),
|
||||
CachePathOverride: getEnv("META_CORE_CACHE_PATH", ""),
|
||||
ReportsPathOverride: getEnv("META_CORE_REPORTS_DB_PATH", ""),
|
||||
ReportsMax: getEnvInt("META_CORE_REPORTS_MAX", 5000),
|
||||
ReportsMaxMB: getEnvInt("META_CORE_REPORTS_MAX_MB", 256),
|
||||
HTTPPort: getEnvInt("META_CORE_HTTP_PORT", 9000),
|
||||
HTTPHost: getEnv("META_CORE_HTTP_HOST", "0.0.0.0"),
|
||||
HealthCheckIntervalMS: getEnvInt("HEALTH_CHECK_INTERVAL_MS", 5000),
|
||||
@@ -110,6 +118,16 @@ func (c *Config) CachePath() string {
|
||||
return c.MetaCorePath + "/db-cache/cache.db"
|
||||
}
|
||||
|
||||
// ReportsDBPath returns the path of the report inbox database. It sits beside
|
||||
// the truth database (so it is backed up with it) but is a separate file:
|
||||
// reports are diagnostics, never metadata.
|
||||
func (c *Config) ReportsDBPath() string {
|
||||
if c.ReportsPathOverride != "" {
|
||||
return c.ReportsPathOverride
|
||||
}
|
||||
return c.MetaCorePath + "/db/reports.db"
|
||||
}
|
||||
|
||||
// MountsFilePath returns the path to the mounts configuration file
|
||||
func (c *Config) MountsFilePath() string {
|
||||
return c.MountsDir + "/mounts.json"
|
||||
|
||||
Reference in New Issue
Block a user