influxdb-client-go icon indicating copy to clipboard operation
influxdb-client-go copied to clipboard

SDK should use local configuration file when no ENV variables are available

Open gitirabassi opened this issue 4 years ago • 2 comments

Much like kubectl, aws and gcloud-cli, az-cli: env variables are the first source of credentials, but they all fall back to local credentials (using the current configured profile)

gitirabassi avatar Mar 18 '20 19:03 gitirabassi

Interesting idea, @gitirabassi. However, I don't think such functionality belongs to the library. This should be incorporated into a tool that uses the library. E.g. if the influx tool would use go client it could use env variables to feed them to the go client API. The examples you provided are actually also tools and they internally use some libraries for connecting to the respective server.

vlastahajek avatar Apr 27 '20 13:04 vlastahajek

@vlastahajek all these tools use the official sdk which has the functionality i’m asking for. This helps giving a consistent feel and usage. Using the influx tool and a custom go program on their machine should work seamesly

gitirabassi avatar Apr 27 '20 14:04 gitirabassi