Add the ability to remove toggle listeners that you have added #69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the changes
This adds two new public functions to RefreshPolicy, and by extension to UnleashClientSpec so that the caller can call them.
Closes #68
Discussion points
I have not added remove functions for the other listeners, as they do not currently expose a function to add listeners through the
UnleashClientSpec
.I have added a test to
RefreshPolicyTest
itself to ensure that adding and removing the listener works as expected.The first commit fixes a little bug I think was there regarding what object was used for synchronization, which I think was simply a misspell. If that was not the case feel free to either revert that yourself or let me know so I can do it.