mirror of https://github.com/status-im/consul.git
agent: Allow 'consul' service to be targeted for events. Fixes #344
This commit is contained in:
parent
bee5fe280c
commit
b804e1ab52
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue