Commit Graph

8 Commits

Author SHA1 Message Date
Łukasz Mierzwa
ded69c11ff Drop the path from v0.4 query args
This results in requests to 'GET http://localhost:9093/api/v1/silences?api/v1/silences?limit=2147483647' instead of 'GET http://localhost:9093/api/v1/silences?limit=2147483647'. Too much copy&paste.
2018-01-25 19:34:35 -08:00
Łukasz Mierzwa
0f73b20bc6 Allow passing query args to HTTP requests send to the Alertmanager API
Alertmanager 0.4.x silences endpoint uses pagination, code for this was incorrectly dropped in #216, re-add it. Requires a way for mapper packages to signal the need for passing query args to HTTP requests
2018-01-24 19:09:02 -08:00
Łukasz Mierzwa
6f89a77f8d Rename 'transport' package to 'uri'
This package adds handlers for different URI schemes, name clashes with http.Transport which is now passed around. Rename it to make it more obvious what it does
2018-01-23 19:32:39 -08:00
Łukasz Mierzwa
c7fb8db98d Drop Release() from SilenceMapper
Not used
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
6124196b0f Finish refactoring mapper package
Fix bugs, add docstrings and let each mapper give us full url since it doesn't handle any http requests now (it just maps text to objects now)
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
0b30a23c2a Refactor mapper package responsibilities
Mapper should only take input, decode it and map onto internal model instances
2018-01-22 11:26:35 -08:00
Łukasz Mierzwa
54b1455276 Use dedicated struct for storing alert annotations
Annotations are just string maps, but to render those we need a bit more information (is it a link, should it be visible by default). Store them as more complex structs internally, this also allows us to drop alert.Links since we now have enough information to tell if annotation is a link
2017-09-07 12:15:32 -07:00
Łukasz Mierzwa
5d4ae47888 Convert all packages to be internal
Internal packages are supported by Go 1.5+, any package in /internal/ dir is only importable from the same repo. This will cleanup main dir a bit and provide better namespace for unsee subpackages
2017-08-04 16:21:27 -07:00