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

feat: add a new function StopWatching() to stop the groutine created by WatchConfig() #1583

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

chowyi
Copy link

@chowyi chowyi commented Jul 7, 2023

I need to stop the WatchConfig() function in certain scenarios. I found someone with the same need in an open Issue: #1404. I have attempted to implement it.

@CLAassistant
Copy link

CLAassistant commented Jul 7, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

github-actions bot commented Jul 7, 2023

👋 Thanks for contributing to Viper! You are awesome! 🎉

A maintainer will take a look at your pull request shortly. 👀

In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.

⏰ If you have a couple minutes, please take some time and share your thoughts: https://forms.gle/R6faU74qPRPAzchZ9

📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:

https://twitter.com/sagikazarmark/status/1306904078967074816

Thank you! ❤️

@sagikazarmark
Copy link
Collaborator

Thanks @chowyi!

Unfortunately, this is a breaking change which is not allowed on the v1 release track at the moment.

I'd be happy to accept a change that introduces a new function implementing the same functionality.

@sagikazarmark sagikazarmark added the kind/enhancement New feature or request label Jul 21, 2023
@chowyi
Copy link
Author

chowyi commented Jul 31, 2023

Thanks for your suggestion @sagikazarmark.
I reverted the previous modification, added a new function StopWatching() implementing the same functionality and the unitTest.

@chowyi chowyi changed the title feat: add a cancel function return from WatchConfig() to stop watchin… feat: add a new function StopWatching() to stop the groutine created by WatchConfig() Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants