Building 70 Projects ranging from beginner to advanced so anyone can β learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company π
Go aicertificationcloud-engineeringcybercybersecuritycybersecurity-analystcybersecurity-certificationcybersecurity-certificationscybersecurity-educationcybersecurity-jobscybersecurity-portfoliocybersecurity-projectscybersecurity-toolsgrchackinglearningpentestingproject-repositoryprojetcspython
feat(monitor/main): wire coinbase BTC/ETH collector under errgroup
CarterPerez-dev99f6e4184534
diff --git a/PROJECTS/advanced/monitor-the-situation-dashboard/backend/cmd/api/main.go b/PROJECTS/advanced/monitor-the-situation-dashboard/backend/cmd/api/main.goindex 4b16eab6..dc760b9d 100644--- a/PROJECTS/advanced/monitor-the-situation-dashboard/backend/cmd/api/main.go+++ b/PROJECTS/advanced/monitor-the-situation-dashboard/backend/cmd/api/main.go@@ -21,6 +21,7 @@ import ("github.com/carterperez-dev/monitor-the-situation/backend/internal/auth""github.com/carterperez-dev/monitor-the-situation/backend/internal/bus""github.com/carterperez-dev/monitor-the-situation/backend/internal/collectors/cfradar"+ "github.com/carterperez-dev/monitor-the-situation/backend/internal/collectors/coinbase""github.com/carterperez-dev/monitor-the-situation/backend/internal/collectors/cve""github.com/carterperez-dev/monitor-the-situation/backend/internal/collectors/dshield""github.com/carterperez-dev/monitor-the-situation/backend/internal/collectors/heartbeat"@@ -221,6 +222,19 @@ func run(configPath string) error {collectorGroup.Go(func() error { return coll.Run(collectorCtx) })}+ if cfg.Collectors.Coinbase.Enabled {+ coll := coinbase.NewCollector(coinbase.CollectorConfig{+ URL: cfg.Collectors.Coinbase.URL,+ ProductIDs: cfg.Collectors.Coinbase.ProductIDs,+ Repo: coinbase.NewRepo(db.DB),+ Emitter: eventBus,+ State: collectorState,+ Throttle: cfg.Collectors.Coinbase.Throttle,+ Logger: logger.With("collector", "coinbase"),+ })+ collectorGroup.Go(func() error { return coll.Run(collectorCtx) })+ }+logger.Info("collectors started","heartbeat", true,"dshield", cfg.Collectors.DShield.Enabled,@@ -228,6 +242,7 @@ func run(configPath string) error {"cve", cfg.Collectors.CVE.Enabled,"kev", cfg.Collectors.KEV.Enabled,"ransomware", cfg.Collectors.Ransomware.Enabled,+ "coinbase", cfg.Collectors.Coinbase.Enabled,)srv := server.New(server.Config{