Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor providers creation functions #30

Merged
merged 5 commits into from
Nov 30, 2022
Merged

Conversation

inkel
Copy link
Collaborator

@inkel inkel commented Nov 30, 2022

Previously all the providers NewProvider functions were doing more than needed by managing creating the required CSP service to access their APIs. This PR changes that to make the providers in the library package to accept the required services and nothing else. Creation of these services is a concern of the library users, not the library itself.

This way we don't need to make the provider aware of implementation
details to create a service. It should make testing and integrating
easier in the long term.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
As before, this makes it easier to integrate and test, and also makes
the provider unaware of AWS authentication.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
Same as what we did for GCP and AWS providers.

Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
@inkel inkel self-assigned this Nov 30, 2022
@inkel inkel merged commit 7b0f03f into main Nov 30, 2022
@inkel inkel deleted the refactor/providers-auth branch November 30, 2022 11:58
@inkel inkel added this to the Release as OSS milestone Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant