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

Generalize watcher interface #82

Closed
oklahomer opened this issue Jun 3, 2019 · 0 comments
Closed

Generalize watcher interface #82

oklahomer opened this issue Jun 3, 2019 · 0 comments
Labels
breaking change v2 https://github.com/oklahomer/go-sarah/issues/68

Comments

@oklahomer
Copy link
Owner

Currently, an interface called watchers.Watcher and its implementation is provided to subscribe to the changes of files under a predefined directory. When a Command or ScheduledTask's configuration file under the directory is updated, this implementation calls a callback function so the latest content of the file is read, mapped to a struct and then a corresponding Command/ScheduledTask is updated.

With the distributed server architecture, however, file-based configuration management is sometimes less preferred. Multiple servers may subscribe to a centralized configuration management system and reflect changes in a more real-time manner. HashiCorp's Consul, LINE's Central Dogma or some similar system can be used for such purpose.

The current wathcers.Watcher should be redefined so the current implementation and some other implementations that subscribe to such systems introduced above can co-exist.

@oklahomer oklahomer added the v2 https://github.com/oklahomer/go-sarah/issues/68 label Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change v2 https://github.com/oklahomer/go-sarah/issues/68
Projects
None yet
Development

No branches or pull requests

1 participant