ambient-local-exporter/config.go

22 lines
802 B
Go
Raw Permalink Normal View History

2025-01-05 01:54:36 +00:00
package main
import "gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
// This configuration extends on go-app config.AppConfig,
// setting configuration for the exporter itself
type AmbientLocalExporterConfig struct {
Redis *RedisConfig
*config.AppConfig
}
type RedisConfig struct {
Enabled bool `yaml:"enabled" env:"APP_REDIS_ENABLED" envDefault:"false"`
Addr string `yaml:"addr" env:"APP_REDIS_ADDR"`
ClientName string `yaml:"clientName" env:"APP_REDIS_CLIENT_NAME"`
Protocol int `yaml:"protocol" env:"APP_REDIS_PROTOCOL"`
Username string `yaml:"username" env:"APP_REDIS_USERNAME"`
Password string `yaml:"password" env:"APP_REDIS_PASSWORD"`
DB int `yaml:"db" env:"APP_REDIS_DB"`
MaxRetries int `yaml:"maxRetries" env:"APP_REDIS_MAX_RETRIES"`
}