-
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
Adding support for 'watches' #298
Conversation
|
||
Watches are a way of specifying a view of data (list of nodes, KV pairs, | ||
health checks, etc) which is monitored for any updates. When an update | ||
is detected, an external handler handler is invoked. A handler can be any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo s/handler handler/handler/
yay! |
👍 |
Great work @armon! |
👍 awesome! |
flag = "-c" | ||
} | ||
cmd := exec.Command(shell, flag, script) | ||
return cmd, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never returns error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not currently, but it forces code upstream to check for a possible error
Allow setting hostPath for client data directory
This adds support for "watches". Watches are similar to Serf events: they allow an external handler to be invoked when data changes in Consul. They are implemented by wrapping blocking queries, with automatic management of the lifecycle.