package storageDBs import ( "gitea.anxinyun.cn/container/common_models" "gitea.anxinyun.cn/container/common_utils/configLoad" "log" ) type IStorageConsumer interface { SaveRaw(d []common_models.EsRaw) SaveTheme(d []common_models.EsTheme) SaveVib(d []common_models.EsVbRaw) SaveGroupTheme(d []common_models.EsGroupTheme) } func LoadIStorageConsumer() []IStorageConsumer { var consumers []IStorageConsumer if configLoad.LoadConfig().GetBool("es.enable") { consumers = append(consumers, NewStorage2Es6ByDefaultConfig()) } else { log.Printf("es 不启用") } if configLoad.LoadConfig().GetBool("influxDB.enable") { consumers = append(consumers, NewStorage2InfluxDB2ByDefaultConfig()) } else { log.Printf("Influx 不启用") } return consumers }