mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-09 10:47:35 +00:00
* Requeue for rolling strategy in mwrs Signed-off-by: Jian Qiu <jqiu@redhat.com> * Add more integration test for rolling Signed-off-by: Jian Qiu <jqiu@redhat.com> --------- Signed-off-by: Jian Qiu <jqiu@redhat.com>
23 lines
380 B
Go
23 lines
380 B
Go
package helpers
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
type RequeueError struct {
|
|
RequeueTime time.Duration
|
|
Message string
|
|
}
|
|
|
|
func (r RequeueError) Error() string {
|
|
return fmt.Sprintf(r.Message+", Requeue time: %v", r.RequeueTime)
|
|
}
|
|
|
|
func NewRequeueError(msg string, requeueTime time.Duration) RequeueError {
|
|
return RequeueError{
|
|
RequeueTime: requeueTime,
|
|
Message: msg,
|
|
}
|
|
}
|