watchdog: migrate to Cobra and Viper for config management; search /etc for configs

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I65dbf466cb030dccc7025585d6282bd26a6a6964
This commit is contained in:
raf 2026-03-01 18:09:34 +03:00
commit f988174145
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
9 changed files with 187 additions and 61 deletions

View file

@ -14,7 +14,7 @@ import (
// Handles incoming analytics events
type IngestionHandler struct {
cfg config.Config
cfg *config.Config
pathNorm *normalize.PathNormalizer
pathRegistry *aggregate.PathRegistry
refRegistry *normalize.ReferrerRegistry
@ -25,7 +25,7 @@ type IngestionHandler struct {
// Creates a new ingestion handler
func NewIngestionHandler(
cfg config.Config,
cfg *config.Config,
pathNorm *normalize.PathNormalizer,
pathRegistry *aggregate.PathRegistry,
refRegistry *normalize.ReferrerRegistry,