-
Notifications
You must be signed in to change notification settings - Fork 3
/
models.go
48 lines (41 loc) · 1.12 KB
/
models.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
42
43
44
45
46
47
48
package main
// Flow object to retrieve and response flows details
type Flow struct {
Name string `json:"name"`
}
type DashboardSpec struct {
TotalFlows int
ReadyFlows int
TotalRequests int
ActiveRequests int
}
type Location struct {
Name string
Link string
}
type FlowDesc struct {
Name string `json:"name"`
Dot string `json:"dot,omitempty"`
InvocationCount int
}
type FlowRequests struct {
Flow string
TracingEnabled bool
Requests map[string]*RequestTrace
CurrentRequestID string
}
// NodeTrace traces of each nodes in a dag
type NodeTrace struct {
StartTime int `json:"start-time"`
Duration int `json:"duration"`
// Other can be added based on the needs
}
// RequestTrace object to retrieve and response traces details
type RequestTrace struct {
RequestID string `json:"request-id"`
TraceId string `json:"trace-id"`
NodeTraces map[string]*NodeTrace `json:"traces"`
StartTime int `json:"start-time"`
Duration int `json:"duration"`
Status string `json:"status"`
}