internal/aggergate: make HLL state path configurable

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8ff8ef25ad945aae918bea97ee39d7ea6a6a6964
This commit is contained in:
raf 2026-03-01 19:23:19 +03:00
commit 2ef2dabf93
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
5 changed files with 167 additions and 63 deletions

View file

@ -83,6 +83,7 @@ type ServerConfig struct {
ListenAddr string `yaml:"listen_addr"`
MetricsPath string `yaml:"metrics_path"`
IngestionPath string `yaml:"ingestion_path"`
StatePath string `yaml:"state_path"` // path to persist HLL state
}
// YAML configuration file
@ -170,6 +171,9 @@ func (c *Config) Validate() error {
if c.Server.IngestionPath == "" {
c.Server.IngestionPath = "/api/event"
}
if c.Server.StatePath == "" {
c.Server.StatePath = "/var/lib/watchdog/hll.state"
}
if c.Security.MetricsAuth.Enabled {
if c.Security.MetricsAuth.Username == "" || c.Security.MetricsAuth.Password == "" {