-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
45 lines (41 loc) · 1.16 KB
/
types.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
package communication
import(
"time"
corev1 "k8s.io/api/core/v1"
)
/*
Message structure used by the Scheduler microservice
*/
type ScheduleRequest struct {
// A string containing pod details in the following format [pod name]@[namespace]
Key string
// Next backoff duration if the pod fails to schedule
NextBackOffTime int
// Total time taken to complete scheduling
ProcessedTime time.Duration
// Supporting information if required [optional]
Message string // Supporting information if required [optional]
}
/*
Message structure for communicating with the Experiment microservice
*/
type ExperimentPayload struct {
// Type of microservice
Type string
// The hostname of the microservice that send this message
Hostname string
// The time a microservice receive the pod
InTime time.Time
// The the a microservice finish processing a pod
OutTime time.Time
// The pod getting processed
Pod *corev1.Pod
}
/*
Message structure for communicating with the Retry microservice
*/
type RetryRequest struct {
Req ScheduleRequest
//Name of the queue the Retry microservice is using
Queue string
}