agent: Allow 'consul' service to be targeted for events. Fixes #344

This commit is contained in:
Ryan Uber 2014-10-14 12:58:52 -07:00
parent bee5fe280c
commit b804e1ab52
1 changed files with 5 additions and 0 deletions

View File

@ -157,6 +157,11 @@ func (a *Agent) shouldProcessUserEvent(msg *UserEvent) bool {
}
if msg.ServiceFilter != "" {
// Handle "consul" service on server nodes
if a.server != nil && msg.ServiceFilter == "consul" {
return true
}
re, err := regexp.Compile(msg.ServiceFilter)
if err != nil {
a.logger.Printf("[ERR] agent: Failed to parse service filter '%s' for event '%s': %v",