mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
3bfa41a95c
* app/vmalert: initial remote-write support for alerts state persistence. If `remotewrite.url` flag is set, vmalert will send alerts state via remote-write protocol to remote storage. The sending is asynchronous to avoid blocking calls in rules evaluation loop. * app/vmalert: merge with master * app/vmalert: write both `instant` and `for` alerts timeseries states in remote storage.
21 lines
291 B
Go
21 lines
291 B
Go
package notifier
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
)
|
|
|
|
type errGroup struct {
|
|
errs []string
|
|
}
|
|
|
|
func (eg *errGroup) err() error {
|
|
if eg == nil || len(eg.errs) == 0 {
|
|
return nil
|
|
}
|
|
return eg
|
|
}
|
|
|
|
func (eg *errGroup) Error() string {
|
|
return fmt.Sprintf("errors:%s", strings.Join(eg.errs, "\n"))
|
|
}
|