influxer
influxer copied to clipboard
Actualize config
What if, instead of duplicating all the options (which is pretty dumb TBH), this library just accepted an initialized InfluxDB::Client instance?
Hi!
instead of duplicating all the options (which is pretty dumb TBH)
Yep, agree. InfluxDB config has become much more complex, it's doesn't make sense to sync it manually.
I see 2 options here:
- Add an ability to provide custom client:
Influxer.client = Influxer::Client.new(opts) # Influxer::Client is almost the same as InfluxDB::Client
- Use
DEFAULT_CONFIG_OPTIONSto buildInfluxer::Configparams dynamically.
What's the reason to have our own config? The main idea was to make it more flexible and configure using different sources (especially ENV vars) with ease.
I think, it make sense to do both.