Add a note about writing new mappers

This commit is contained in:
Łukasz Mierzwa
2017-04-06 19:24:48 -07:00
parent e46585db43
commit c3bed3cc62
+12
View File
@@ -58,3 +58,15 @@ When running docker image via `make run-docker` with `DEBUG` make variable set
to `true` volume mapping will be added (in read-only mode), so that unsee
instance running inside the docker can read asset files from the sources
directory.
## Adding support for new Alertmanager release
To support a new release that breaks API following changes needs to be done:
* Verify that `GetVersion()` function can still correctly read remote
Alertmanager version via `/api/v1/status` endpoint, adapt it if needed.
* Create a new mapper package implementing unmarshaling of alerts and/or
silences (depending if both need a new code) under mapper/vXY (X major
Alertmanager version, Y minor version).
* Register new mapper in the `init()` function in the
`alertmanager/alertmanager.go` file.