Commit Graph

16 Commits

Author SHA1 Message Date
Simon Pasquier f626bd2850 *: support Go modules
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-16 15:09:33 +01:00
Marcin Owsiany f30f428035 Add a way to return the body of a 5xx response. (#484)
expose body when handling HTTP errors

Signed-off-by: Marcin Owsiany <marcin@owsiany.pl>
2018-10-25 18:44:21 +01:00
Adam Jaso 93edea3720 Do not parse json on 204 responses (#476)
* Do not return BadResponse for no content 

Signed-off-by: Adam Jaso <2285656+adamjaso@users.noreply.github.com>
2018-10-10 17:20:17 +03:00
Bryan Boreham 8fbbc9bc6b Decode JSON body when Prometheus returns 400 to an api call
400 and 422 are documented error codes from Prometheus, so we should
attempt to parse the error returned for both of them.

Needed to change a test that was requiring the old behaviour - made it
use 500 instead of 400.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2018-06-04 10:35:16 +00:00
Bob Shannon 335dadb61a PR comments
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-12 06:49:52 -07:00
Bob Shannon e3e66d0bb9 PR comments
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-11 07:38:50 -07:00
Bob Shannon e035b26e30 Bump go version used in build
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 18:44:17 -07:00
Bob Shannon 5393573c73 Implement AlertManager, Status, and Target methods
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 07:21:46 -07:00
Bob Shannon 10dfec77bf Implement admin methods for Prometheus API
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-09 21:03:46 -07:00
Vaisakh Rajagopal e06fadcc6f Replaced hardcoded arg('GET') with http.MethodGet constant 2018-02-23 00:53:19 +05:30
siddontang 3c0e2b3c2e v1: support series API 2017-11-24 20:12:53 +08:00
Ilia Choly a132856ffd Omit zero value query time 2017-11-16 16:39:52 -05:00
André Carvalho 8077e4bd69
api: fix typo in comments 2017-04-25 18:17:16 -03:00
André Carvalho 6fdb468212
api: add build tag for go 1.7 2017-04-24 18:05:17 -03:00
André Carvalho 11fae2ef0c
api: uses stdlib context 2017-04-20 09:57:46 -03:00
André Carvalho 349922b38c
api: creates versioned package for prometheus v1 api
This commit creates a new package to hold the prometheus
v1 API interface. This interface will contain all the funcionality
exposed by Prometheus v1 HTTP API.

The underlying http client is kept on the api package since it
may be reused across diferent API versions and also by the Alertmanager
api package (to come.)
2017-04-19 18:24:14 -03:00