-
Notifications
You must be signed in to change notification settings - Fork 124
/
gitops_engine.go
38 lines (32 loc) · 953 Bytes
/
gitops_engine.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
package v1alpha1
type HealthStatusCode string
const (
HealthStatusUnknown HealthStatusCode = "Unknown"
HealthStatusProgressing HealthStatusCode = "Progressing"
HealthStatusHealthy HealthStatusCode = "Healthy"
HealthStatusSuspended HealthStatusCode = "Suspended"
HealthStatusDegraded HealthStatusCode = "Degraded"
HealthStatusMissing HealthStatusCode = "Missing"
)
type OperationPhase string
const (
OperationRunning OperationPhase = "Running"
OperationTerminating OperationPhase = "Terminating"
OperationFailed OperationPhase = "Failed"
OperationError OperationPhase = "Error"
OperationSucceeded OperationPhase = "Succeeded"
)
func (os OperationPhase) Completed() bool {
switch os {
case OperationFailed, OperationError, OperationSucceeded:
return true
}
return false
}
func (os OperationPhase) Failed() bool {
switch os {
case OperationFailed, OperationError:
return true
}
return false
}