feat(monitor/config): coinbase config block (enabled, url, product_ids, throttle)
This commit is contained in:
parent
89f1c10249
commit
0a6f4f1e09
|
|
@ -34,6 +34,7 @@ type CollectorsConfig struct {
|
|||
KEV SourceConfig `koanf:"kev"`
|
||||
Ransomware SourceConfig `koanf:"ransomware"`
|
||||
GreyNoise GreyNoiseConfig `koanf:"greynoise"`
|
||||
Coinbase CoinbaseConfig `koanf:"coinbase"`
|
||||
}
|
||||
|
||||
type SourceConfig struct {
|
||||
|
|
@ -60,6 +61,13 @@ type GreyNoiseConfig struct {
|
|||
APIKey string `koanf:"api_key"`
|
||||
}
|
||||
|
||||
type CoinbaseConfig struct {
|
||||
Enabled bool `koanf:"enabled"`
|
||||
URL string `koanf:"url"`
|
||||
ProductIDs []string `koanf:"product_ids"`
|
||||
Throttle time.Duration `koanf:"throttle"`
|
||||
}
|
||||
|
||||
type AppConfig struct {
|
||||
Name string `koanf:"name"`
|
||||
Version string `koanf:"version"`
|
||||
|
|
@ -250,6 +258,10 @@ func loadDefaults(k *koanf.Koanf) error {
|
|||
"collectors.ransomware.enabled": true,
|
||||
"collectors.ransomware.interval": "15m",
|
||||
"collectors.greynoise.enabled": true,
|
||||
"collectors.coinbase.enabled": true,
|
||||
"collectors.coinbase.url": "wss://advanced-trade-ws.coinbase.com",
|
||||
"collectors.coinbase.product_ids": []string{"BTC-USD", "ETH-USD"},
|
||||
"collectors.coinbase.throttle": "250ms",
|
||||
}
|
||||
|
||||
for key, value := range defaults {
|
||||
|
|
|
|||
Loading…
Reference in New Issue