influxer icon indicating copy to clipboard operation
influxer copied to clipboard

Actualize config

Open palkan opened this issue 9 years ago • 2 comments

Sync with this.

palkan avatar Jul 29 '16 06:07 palkan

What if, instead of duplicating all the options (which is pretty dumb TBH), this library just accepted an initialized InfluxDB::Client instance?

vassilevsky avatar Dec 06 '17 11:12 vassilevsky

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

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.

palkan avatar Dec 06 '17 11:12 palkan