-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
domain.go
41 lines (34 loc) · 990 Bytes
/
domain.go
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
package insights
import (
"time"
)
// TestRunLabels describes labels associated with a single test run.
type TestRunLabels struct {
ID int64
Scenario string
Group string
}
// ProtocolLabels is a dummy interface that is used for compile-time type checking.
type ProtocolLabels interface {
IsProtocolLabels()
}
// ProtocolHTTPLabels describes labels associated with a single HTTP request.
type ProtocolHTTPLabels struct {
URL string
Method string
StatusCode int64
}
// IsProtocolLabels is a dummy implementation to satisfy the ProtocolLabels interface.
func (ProtocolHTTPLabels) IsProtocolLabels() {
// Do nothing
}
// RequestMetadatas is a slice of RequestMetadata.
type RequestMetadatas []RequestMetadata
// RequestMetadata describes metadata associated with a single *traced* request.
type RequestMetadata struct {
TraceID string
Start time.Time
End time.Time
TestRunLabels TestRunLabels
ProtocolLabels ProtocolLabels
}