-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
75 lines (65 loc) · 1.98 KB
/
types.go
File metadata and controls
75 lines (65 loc) · 1.98 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// ingress/egress rule types based on:
// https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/networking/types.go
package main
// Record captures the internal representation of a test run
type Record struct {
Fail int `json:"fail"`
Pass int `json:"pass"`
Duration int `json:"duration"`
Time string `json:"time"`
FailLog []string `json:"failLog"`
PassLog []string `json:"passLog"`
Head string `json:"head"`
Histogram map[string]int `json:"histogram"`
}
// VegaLiteItem wraps a data point in the main Vega-Lite config
type VegaLiteItem struct {
Tests int `json:"tests"`
Time string `json:"time"`
Result string `json:"result"`
}
// VegaLiteDurationItem wraps a data point in the duration Vega-Lite config
type VegaLiteDurationItem struct {
Duration float64 `json:"duration"`
Time string `json:"time"`
}
// VegaLiteHistogramItem wraps a data point in the histogram Vega-Lite config
type VegaLiteHistogramItem struct {
Test string `json:"test"`
Count int `json:"count"`
}
// Metrics describes the return JSON object of a metrics query
type Metrics struct {
Fail int `json:"fail"`
Pass int `json:"pass"`
}
// RunTestsParam gathers up the parameters passed to the test runner goroutine
type RunTestsParam struct {
datadir string
outputdir string
context string
retain int
errors bool
duration bool
histogram bool
cache bool
}
// ParsedHistory prevents a lengthy list of return values from getHistoryData()
type ParsedHistory struct {
jsonResults []byte
jsonDurations []byte
jsonHistogram []byte
maxTests int
logEntries []string
logHead string
lastRecord Record
}
// MinimalObject is a placeholder struct for Kubernetes manifests
type MinimalObject struct {
Kind string
}
// Result TODO remove
type Result struct {
PercentageIsolated int `json:"percentageIsolated"`
PercentageNamespaceCoverage int `json:"percentageNamespaceCoverage"`
}