Commit Graph

27 Commits

Author SHA1 Message Date
George Robinson 342f6a599c
Add godot linter (#3613)
* Add godot linter

Signed-off-by: George Robinson <george.robinson@grafana.com>

* Remove extra line from LICENSE

Signed-off-by: George Robinson <george.robinson@grafana.com>

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2024-03-21 11:26:46 +00:00
Matthias Loibl a6d10bd5bc
Update golangci-lint and fix complaints (#2853)
* Copy latest golangci-lint files from Prometheus

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Use grafana/regexp over stdlib regexp

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Fix typos in comments

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Fix goimports complains in import sorting

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* gofumpt all Go files

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Update naming to comply with revive linter

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* config: Fix error messages to be lower case

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* test/cli: Fix error messages to be lower case

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* .golangci.yaml: Remove obsolete space

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* config: Fix expected victorOps error

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Use stdlib regexp

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Clean up Go modules

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2022-03-25 17:59:51 +01:00
Peter Štibraný 15ea220f45 Don't return error from mem.Alerts.Put.
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2021-05-31 10:05:04 +02:00
Peter Štibraný cc0b08fd7c Added possibility to pass callback to *mem.NewAlerts, useful for implementing limits on alerts.
Update provider/mem/mem.go

Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2021-05-31 09:56:57 +02:00
Fabian Reinartz 3b5dfa8aba provider: delete old silence provider 2016-08-30 12:01:24 +02:00
Fabian Reinartz 1baf98fb1a provider: remove NotificationInfos provider 2016-08-23 13:57:19 +02:00
Fabian Reinartz 66c2171bd8 *: rename NotifyInfo to NotificationInfo 2016-08-09 12:01:31 +02:00
Fabian Reinartz 81cbf3cda7 *: refactor Silence type, use UUID
This commit removes the dependency on model.Silence for the internal
Silence type, uses UUIDs instead of uint64s and clarifies invariants
around timestamp handling.

The created_at timestamp is removed for the time being.
2016-08-09 11:59:35 +02:00
Fabian Reinartz a50171cf39 Remove old providers and dependencies 2015-12-08 12:16:48 +01:00
Fabian Reinartz cadae2a9e5 Implement SQLite persistence provider 2015-12-08 11:55:28 +01:00
beorn7 93ffa534a5 PR with changes after code review
Now to be reverse-reveiewed.
2015-11-23 18:24:57 +01:00
Fabian Reinartz 8d2bbc348b Simplify and rename notification info struct.
The delivered field was previously unused and is removed by this commit.
Only successful notifications are stored. The type was renamed to NotifyInfo.
2015-11-06 10:09:39 +01:00
Fabian Reinartz ce74f8363b Simplify initialization
No longer update components based on a new configuration. Generally,
destroying and recreating has no performance impact and is less
error-prone.
This also removes the Reloadable interface and simplifies the entire
startup contraption.
2015-10-11 16:54:39 +02:00
Fabian Reinartz 77cce75c05 Simplify notify provider interface 2015-10-06 20:40:52 +02:00
Fabian Reinartz fdf4d80003 Implement silence provider check for bad insert 2015-10-01 20:58:14 +02:00
Fabian Reinartz 46e09e2b2c Switch to model.Silence 2015-10-01 17:50:15 +02:00
Fabian Reinartz 331ad31401 Implement configuration reloading 2015-09-29 12:22:13 +02:00
Fabian Reinartz 3b401c413b Add pending alert iterator 2015-09-29 10:45:58 +02:00
Fabian Reinartz 54a8d6ea04 Adjust alert subscription behavior.
Rename IterActive to Subscribe. The returned iterator now
returns all alerts with pending notifications which may also include
resolved alerts.
2015-09-29 10:00:02 +02:00
Fabian Reinartz c40c31772f Rename Silencer to Muter 2015-09-28 14:13:01 +02:00
Fabian Reinartz 78a7ec62d9 Implement in-memory notifies provider 2015-09-27 20:16:42 +02:00
Fabian Reinartz 49da433478 Add notify and shared data source for providers 2015-09-27 19:50:24 +02:00
Fabian Reinartz 5d0f3ffa0e Generalize iterator interface, locking fixes 2015-09-27 12:28:03 +02:00
Fabian Reinartz 4b58d30f4d Add safer AlertIterator interface 2015-09-26 11:14:18 +02:00
Fabian Reinartz 89e8d82a1b Fix compile issues 2015-09-26 11:14:18 +02:00
Fabian Reinartz e861482761 Add in-memory alert provider 2015-09-25 14:38:07 +02:00
Fabian Reinartz 0ffdd6fa2f Move providers into their own package 2015-09-25 13:18:28 +02:00