File: snapshots_reponse.go

package info (click to toggle)
prometheus-elasticsearch-exporter 1.1.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 716 kB
  • sloc: makefile: 75; sh: 50
file content (35 lines) | stat: -rw-r--r-- 1,329 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package collector

import "time"

// SnapshotStatsResponse is a representation of the snapshots stats
type SnapshotStatsResponse struct {
	Snapshots []SnapshotStatDataResponse `json:"snapshots"`
}

// SnapshotStatDataResponse is a representation of the single snapshot stat
type SnapshotStatDataResponse struct {
	Snapshot          string        `json:"snapshot"`
	UUID              string        `json:"uuid"`
	VersionID         int64         `json:"version_id"`
	Version           string        `json:"version"`
	Indices           []string      `json:"indices"`
	State             string        `json:"state"`
	StartTime         time.Time     `json:"start_time"`
	StartTimeInMillis int64         `json:"start_time_in_millis"`
	EndTime           time.Time     `json:"end_time"`
	EndTimeInMillis   int64         `json:"end_time_in_millis"`
	DurationInMillis  int64         `json:"duration_in_millis"`
	Failures          []interface{} `json:"failures"`
	Shards            struct {
		Total      int64 `json:"total"`
		Failed     int64 `json:"failed"`
		Successful int64 `json:"successful"`
	} `json:"shards"`
}

// SnapshotRepositoriesResponse is a representation snapshots repositories
type SnapshotRepositoriesResponse map[string]struct {
	Type     string            `json:"type"`
	Settings map[string]string `json:"settings"`
}