Rename auth config APIs#1297
Conversation
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
|
@ArthurSens can you elaborate on what this helps with? The way that I see it, this config struct is already general. The auth modules are just a key in that struct. Do you have larger plans that this supports? I want to understand the context to help figure out the direction. |
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
6d038ac to
65ced9f
Compare
Sure thing! I've opened #1299, hoping it makes the goal here easier to understand. This PR (1297) is only about renaming the existing In #1299, I'm reintroducing the I'm 100% open to feedback here. I know that renaming public structs is a breaking change if someone else is already using them. Please let me know if you have something different in mind :) |
|
@ArthurSens Thanks for that follow up PR. I think I understand where you're heading now. I'm not sure we need the rename. In my opinion, this struct is already able to hold all of those configuration options. Long term, it would be good for the auth modules to be able to be used more widely in this exporter (I think they're mostly used in the multi-target functionality today). Do you have a specific case in mind where we need this to be separate from the more global config? |
Not really, to be honest, I'm just trying my best to keep PRs as small as possible so it's easier to review. I can adjust #1299 so |
Yeah, if I change the base branch from #1299 to master, then the diff from this PR will show up on that PR as well. |
|
closing in favor of #1330 |
This PR builds on #1296; it just renames the
ConfigAPI toAuthConfigsince it only covers Auth.The reason I'm making this change is that I want
Configto be a broader struct.Configshould hold all the configuration options that we currently implement as CLI flags. The postgres_exporter will continue to implement this newConfigstruct using CLI/Env vars, but it will also allow downstream projects to implement the same struct using other strategies, such as Go Tags, YAML deserializers, or any other approach that might be needed.