-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathmodels.go
More file actions
47 lines (39 loc) · 1019 Bytes
/
models.go
File metadata and controls
47 lines (39 loc) · 1019 Bytes
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
package kuberesolver
type EventType string
const (
Added EventType = "ADDED"
Modified EventType = "MODIFIED"
Deleted EventType = "DELETED"
Error EventType = "ERROR"
)
// Event represents a single event to a watched resource.
type Event struct {
Type EventType `json:"type"`
Object EndpointSlice `json:"object"`
}
type EndpointSliceList struct {
Items []EndpointSlice
}
type EndpointSlice struct {
Endpoints []Endpoint
Ports []EndpointPort
}
type Endpoint struct {
Addresses []string
Conditions EndpointConditions
}
type EndpointConditions struct {
Ready *bool `json:"ready"`
Serving *bool `json:"serving"`
Terminating *bool `json:"terminating"`
}
type Metadata struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
ResourceVersion string `json:"resourceVersion"`
Labels map[string]string `json:"labels"`
}
type EndpointPort struct {
Name string `json:"name"`
Port int `json:"port"`
}