Skip to content

Commit 5c7bcd9

Browse files
committed
add IsReady() convenience method to component.Status
1 parent 6b8876e commit 5c7bcd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/component/component.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,11 @@ func (s *RetrySpec) GetRetryInterval() time.Duration {
182182
return time.Duration(0)
183183
}
184184

185+
// Check if state is Ready.
186+
func (s *Status) IsReady() bool {
187+
return s.State == StateReady
188+
}
189+
185190
// Get state (and related details).
186191
func (s *Status) GetState() (State, string, string) {
187192
var cond *Condition

0 commit comments

Comments
 (0)