{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/consul/issues/829","labels_url":"https://api.github.com/repos/hashicorp/consul/issues/829/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/consul/issues/829/comments","events_url":"https://api.github.com/repos/hashicorp/consul/issues/829/events","html_url":"https://github.com/hashicorp/consul/issues/829","id":65315228,"number":829,"title":"Watches for Go API","user":{"login":"apoydence","id":6554782,"avatar_url":"https://avatars.githubusercontent.com/u/6554782?v=3","gravatar_id":"","url":"https://api.github.com/users/apoydence","html_url":"https://github.com/apoydence","followers_url":"https://api.github.com/users/apoydence/followers","following_url":"https://api.github.com/users/apoydence/following{/other_user}","gists_url":"https://api.github.com/users/apoydence/gists{/gist_id}","starred_url":"https://api.github.com/users/apoydence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apoydence/subscriptions","organizations_url":"https://api.github.com/users/apoydence/orgs","repos_url":"https://api.github.com/users/apoydence/repos","events_url":"https://api.github.com/users/apoydence/events{/privacy}","received_events_url":"https://api.github.com/users/apoydence/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-30T22:15:19Z","updated_at":"2015-03-30T22:25:32Z","closed_at":null,"body":"Is there any way to setup a watch to call a function within the API?  Or do you have to use the command line `consul watch` that then requires a script?"},"comment":{"url":"https://api.github.com/repos/hashicorp/consul/issues/comments/87858505","html_url":"https://github.com/hashicorp/consul/issues/829#issuecomment-87858505","issue_url":"https://api.github.com/repos/hashicorp/consul/issues/829","id":87858505,"user":{"login":"ryanuber","id":1642288,"avatar_url":"https://avatars.githubusercontent.com/u/1642288?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanuber","html_url":"https://github.com/ryanuber","followers_url":"https://api.github.com/users/ryanuber/followers","following_url":"https://api.github.com/users/ryanuber/following{/other_user}","gists_url":"https://api.github.com/users/ryanuber/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanuber/subscriptions","organizations_url":"https://api.github.com/users/ryanuber/orgs","repos_url":"https://api.github.com/users/ryanuber/repos","events_url":"https://api.github.com/users/ryanuber/events{/privacy}","received_events_url":"https://api.github.com/users/ryanuber/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T22:25:32Z","updated_at":"2015-03-30T22:25:32Z","body":"@apoydence you are correct that you would still need a script. You can use the command-line `consul watch` to create a watch as an external process, or you can configure Consul with internal watches, which fire the handler script that you configure. This helps reduce the number of moving parts."}}