-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
831 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,24 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
"time" | ||
|
||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
type StepStatus struct { | ||
Phase StepPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=StepPhase"` | ||
Reason string `json:"reason,omitempty" protobuf:"bytes,8,opt,name=reason"` | ||
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` | ||
Replicas uint32 `json:"replicas,omitempty" protobuf:"varint,5,opt,name=replicas"` | ||
Selector string `json:"selector,omitempty" protobuf:"bytes,7,opt,name=selector"` | ||
LastScaledAt *metav1.Time `json:"lastScaledAt,omitempty" protobuf:"bytes,6,opt,name=lastScaledAt"` | ||
SourceStatues SourceStatuses `json:"sourceStatuses,omitempty" protobuf:"bytes,3,rep,name=sourceStatuses"` | ||
SinkStatues SinkStatuses `json:"sinkStatuses,omitempty" protobuf:"bytes,4,rep,name=sinkStatuses"` | ||
} | ||
|
||
func (m *StepStatus) GetSourceStatues() SourceStatuses { | ||
if m == nil { | ||
return nil | ||
} | ||
return m.SourceStatues | ||
Phase StepPhase `json:"phase" protobuf:"bytes,1,opt,name=phase,casttype=StepPhase"` | ||
Reason string `json:"reason" protobuf:"bytes,8,opt,name=reason"` | ||
Message string `json:"message" protobuf:"bytes,2,opt,name=message"` | ||
Replicas uint32 `json:"replicas" protobuf:"varint,5,opt,name=replicas"` | ||
Selector string `json:"selector" protobuf:"bytes,7,opt,name=selector"` | ||
LastScaledAt metav1.Time `json:"lastScaledAt" protobuf:"bytes,6,opt,name=lastScaledAt"` | ||
SourceStatuses SourceStatuses `json:"sourceStatuses" protobuf:"bytes,3,rep,name=sourceStatuses"` | ||
SinkStatues SinkStatuses `json:"sinkStatuses" protobuf:"bytes,4,rep,name=sinkStatuses"` | ||
} | ||
|
||
func (m *StepStatus) GetReplicas() int { | ||
if m == nil { | ||
return -1 | ||
} | ||
func (m StepStatus) GetReplicas() int { | ||
return int(m.Replicas) | ||
} | ||
|
||
func (m *StepStatus) GetLastScaledAt() time.Time { | ||
if m == nil || m.LastScaledAt == nil { | ||
return time.Time{} | ||
} | ||
return m.LastScaledAt.Time | ||
} | ||
|
||
func (in *StepStatus) AnyErrors() bool { | ||
return in.SinkStatues.AnyErrors() || in.SourceStatues.AnyErrors() | ||
func (in StepStatus) AnyErrors() bool { | ||
return in.SinkStatues.AnyErrors() || in.SourceStatuses.AnyErrors() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.