offa / influxdb-cxx

InfluxDB C++ client library.
MIT License
119 stars 45 forks source link

Transport options API #216

Closed offa closed 9 months ago

offa commented 1 year ago

The configuration string is too limited for certain features (see discussion) and an API for different types of options is needed.

Related:

offa commented 11 months ago

A possible implementation could look like this (using some of the related issues for demonstration):

auto db = influxdb::http("http://localhost:8086?db=test")
    .setProxy(…)
    .setTimeout(10_s)
    .setVerifyCert(false)
    .connect();

This would enable settings for Http transport only and not alter the Transport interface for all classes. What do you think?