-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Feature request: HTTP Endpoint for WatchHandler #3305
Comments
@HadarGreinsmark we talked about this internally, and this is a good addition to consul. Thanks for volunteering to implement this. One suggestion as you start work on this - We would like the endpoint's behavior be configurable. For example don't support just POST but allow the http method to be configurable. Take a look at https://www.consul.io/docs/agent/options.html#http_config with its sub keys for a canonical example on how to set up configuration. For this feature, we could make the url, method, headers, and keep-alive time configurable to start, and that gives us a starting point to add more options if use cases demand it in the future. Let us know if you have other questions, looking forward to seeing this get in. |
Good to hear that! I'll start to implement this in the end of next week. |
@HadarGreinsmark Is the implementation done for HTTP Watch Endpoint? |
Yes @p1nkrock , it is sort of done as I see it. The pull request just has to be reviewed and merged. |
Currently when a new watch is triggered, you can specify a handler that execute an executable
when changes are made. The executable get the trigger message through a JSON object on stdin. It would be nice to have an additional handler that specify an HTTP endpoint, similar to health checks.
As for an example configuration like this:
the WatchHandler would send this when triggered:
The connection could
keep-alive
for a long time, if the server is agreeing on it.Inspiration: https://developers.google.com/drive/v3/web/push
I would be willing to implement this.
The text was updated successfully, but these errors were encountered: