-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Move retriever / notifier / exporter on their own packages. #264
Conversation
This reverts commit 4c9f828.
221b65e
to
dbb1ed0
Compare
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
7ea1f3b
to
2a2a202
Compare
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Signed-off-by: Thomas Poignant <[email protected]>
Thank you, the PR description is very detailed. I only skimmed over the changes, but LGTM. Only nit is that the placing of the testdata feels a little non-idiomatic. As the exporters/retrievers/notifiers are more isolated now I would normally expect the testdata right next to each exporter. Like |
Signed-off-by: Thomas Poignant <[email protected]>
Kudos, SonarCloud Quality Gate passed!
|
Description
This version change the way to do your SDK initialization in particular when it comes to
notifier
,provider
andexporter
.Why are we doing this breaking changes?
This change is needed because we are adding more and more retriever / exporter and notifier, and with that we are also adding more dependencies to the project.
And since all the dependencies are in the same package we were increasing the size of your build even if you were not using the new providers.
The best example is when we introduce the kubernetes provider, it has added ~20Mo in your application because the
client-go
from kubernetes is huge.What did we change?
We have moved all retriever / exporter and notifier in a dedicated package for each of them.
With this new organisation when building your app we will use only the dependencies related to your configuration.
We also change the way to deal with the
notifiers
to align it with the way it work for other extensions.How to migrate?
Edit your init function of
go-feature-flag
and replace your retriever, exporter, notifier following this.Retrievers
Exporters
Notifiers
Since in this PR we change the way to work with notifier, you have more impact when configuring them.
Before this PR to configure a notifier you had something like that.
With this PR we had remove the
ffclient.NotifierConfig
struct to use directly thenotifier
them self.It means that now
ffclient.Config.Notifiers
has the type[]notifier.Notifier
.So it will look like:
To follow the same pattern has the
retrievers
andexporters
we also have changed the struct you were using.Changes include
Closes issue(s)
Resolve #256
Checklist