forked from mirror/client_golang
Use time.Time for timestamps in Runtimeinfo (#777)
Signed-off-by: Maximilian Gaß <m.gass@babiel.com>
This commit is contained in:
parent
6cd29bd38a
commit
b0cdec211b
|
@ -285,18 +285,18 @@ type FlagsResult map[string]string
|
||||||
|
|
||||||
// RuntimeinfoResult contains the result from querying the runtimeinfo endpoint.
|
// RuntimeinfoResult contains the result from querying the runtimeinfo endpoint.
|
||||||
type RuntimeinfoResult struct {
|
type RuntimeinfoResult struct {
|
||||||
StartTime string `json:"startTime"`
|
StartTime time.Time `json:"startTime"`
|
||||||
CWD string `json:"CWD"`
|
CWD string `json:"CWD"`
|
||||||
ReloadConfigSuccess bool `json:"reloadConfigSuccess"`
|
ReloadConfigSuccess bool `json:"reloadConfigSuccess"`
|
||||||
LastConfigTime string `json:"lastConfigTime"`
|
LastConfigTime time.Time `json:"lastConfigTime"`
|
||||||
ChunkCount int `json:"chunkCount"`
|
ChunkCount int `json:"chunkCount"`
|
||||||
TimeSeriesCount int `json:"timeSeriesCount"`
|
TimeSeriesCount int `json:"timeSeriesCount"`
|
||||||
CorruptionCount int `json:"corruptionCount"`
|
CorruptionCount int `json:"corruptionCount"`
|
||||||
GoroutineCount int `json:"goroutineCount"`
|
GoroutineCount int `json:"goroutineCount"`
|
||||||
GOMAXPROCS int `json:"GOMAXPROCS"`
|
GOMAXPROCS int `json:"GOMAXPROCS"`
|
||||||
GOGC string `json:"GOGC"`
|
GOGC string `json:"GOGC"`
|
||||||
GODEBUG string `json:"GODEBUG"`
|
GODEBUG string `json:"GODEBUG"`
|
||||||
StorageRetention string `json:"storageRetention"`
|
StorageRetention string `json:"storageRetention"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SnapshotResult contains the result from querying the snapshot endpoint.
|
// SnapshotResult contains the result from querying the snapshot endpoint.
|
||||||
|
|
|
@ -646,10 +646,10 @@ func TestAPIs(t *testing.T) {
|
||||||
"storageRetention": "1d",
|
"storageRetention": "1d",
|
||||||
},
|
},
|
||||||
res: RuntimeinfoResult{
|
res: RuntimeinfoResult{
|
||||||
StartTime: "2020-05-18T15:52:53.4503113Z",
|
StartTime: time.Date(2020, 5, 18, 15, 52, 53, 450311300, time.UTC),
|
||||||
CWD: "/prometheus",
|
CWD: "/prometheus",
|
||||||
ReloadConfigSuccess: true,
|
ReloadConfigSuccess: true,
|
||||||
LastConfigTime: "2020-05-18T15:52:56Z",
|
LastConfigTime: time.Date(2020, 5, 18, 15, 52, 56, 0, time.UTC),
|
||||||
ChunkCount: 72692,
|
ChunkCount: 72692,
|
||||||
TimeSeriesCount: 18476,
|
TimeSeriesCount: 18476,
|
||||||
CorruptionCount: 0,
|
CorruptionCount: 0,
|
||||||
|
|
Loading…
Reference in New Issue