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"`
|
KEV SourceConfig `koanf:"kev"`
|
||||||
Ransomware SourceConfig `koanf:"ransomware"`
|
Ransomware SourceConfig `koanf:"ransomware"`
|
||||||
GreyNoise GreyNoiseConfig `koanf:"greynoise"`
|
GreyNoise GreyNoiseConfig `koanf:"greynoise"`
|
||||||
|
Coinbase CoinbaseConfig `koanf:"coinbase"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SourceConfig struct {
|
type SourceConfig struct {
|
||||||
|
|
@ -60,6 +61,13 @@ type GreyNoiseConfig struct {
|
||||||
APIKey string `koanf:"api_key"`
|
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 {
|
type AppConfig struct {
|
||||||
Name string `koanf:"name"`
|
Name string `koanf:"name"`
|
||||||
Version string `koanf:"version"`
|
Version string `koanf:"version"`
|
||||||
|
|
@ -250,6 +258,10 @@ func loadDefaults(k *koanf.Koanf) error {
|
||||||
"collectors.ransomware.enabled": true,
|
"collectors.ransomware.enabled": true,
|
||||||
"collectors.ransomware.interval": "15m",
|
"collectors.ransomware.interval": "15m",
|
||||||
"collectors.greynoise.enabled": true,
|
"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 {
|
for key, value := range defaults {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue