package config type RecorderType string const ( TypeMemory RecorderType = "memory" // Stores weather updates in memory TypeRedis RecorderType = "redis" // Required for replicas > 1 TypeNoop RecorderType = "noop" // No-op implementation ) type RecorderConfig struct { Type RecorderType `yaml:"type" env:"RECORDER_TYPE" json:"type,omitempty" enum:"memory,redis,noop"` KeepLast int `yaml:"keepLast" env:"RECORDER_KEEP_LAST" json:"keepLast,omitempty" default:"120"` RedisConfig *RedisConfig `yaml:"redisConfig,omitempty" json:"redisConfig,omitempty"` } type RedisConfig struct { RedisHost string `yaml:"redisHost" env:"REDIS_HOST" default:"127.0.0.1" json:"redisHost,omitempty"` RedisPort int `yaml:"redisPort" env:"REDIS_PORT" default:"6379" json:"redisPort,omitempty"` RedisUser string `yaml:"redisUser" env:"REDIS_USER" json:"redisUser,omitempty"` RedisPassword string `yaml:"redisPassword" env:"REDIS_PASSWORD" json:"redisPassword,omitempty"` RedisDB int `yaml:"redisDB" env:"REDIS_DB" default:"0" json:"redisDB,omitempty"` RedisTLS bool `yaml:"redisTLS" env:"REDIS_TLS" default:"false" json:"redisTLS,omitempty"` RedisTLSInsecure bool `yaml:"redisTLSInsecure" env:"REDIS_TLS_INSECURE" default:"false" json:"redisTLSInsecure,omitempty"` }