mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
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 != "" {
|
if msg.ServiceFilter != "" {
|
||||||
|
// Handle "consul" service on server nodes
|
||||||
|
if a.server != nil && msg.ServiceFilter == "consul" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
re, err := regexp.Compile(msg.ServiceFilter)
|
re, err := regexp.Compile(msg.ServiceFilter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
a.logger.Printf("[ERR] agent: Failed to parse service filter '%s' for event '%s': %v",
|
a.logger.Printf("[ERR] agent: Failed to parse service filter '%s' for event '%s': %v",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user