From a858b7e39391dc6733891efd08a4241cdff02405 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 28 Apr 2020 11:19:37 +0300 Subject: [PATCH] app/vmalert: added missing comments for public entities --- app/vmalert/remotewrite/remotewrite.go | 1 + app/vmalert/rule.go | 1 + 2 files changed, 2 insertions(+) diff --git a/app/vmalert/remotewrite/remotewrite.go b/app/vmalert/remotewrite/remotewrite.go index 716e3aa077..10586b029b 100644 --- a/app/vmalert/remotewrite/remotewrite.go +++ b/app/vmalert/remotewrite/remotewrite.go @@ -30,6 +30,7 @@ type Client struct { doneCh chan struct{} } +// Config is config for remote write. type Config struct { // Addr of remote storage Addr string diff --git a/app/vmalert/rule.go b/app/vmalert/rule.go index 1a6a78c91e..1857053952 100644 --- a/app/vmalert/rule.go +++ b/app/vmalert/rule.go @@ -218,6 +218,7 @@ const ( alertStateLabel = "alertstate" ) +// AlertToTimeSeries converts the given alert with the given timestamp to timeseries func (r *Rule) AlertToTimeSeries(a *notifier.Alert, timestamp time.Time) []prompbmarshal.TimeSeries { var tss []prompbmarshal.TimeSeries tss = append(tss, alertToTimeSeries(r.Name, a, timestamp))