Files
open-cluster-management/pkg/common/helpers/error.go
Jian Qiu 976019dd43 🐛 Requeue for rolling strategy in mwrs (#337)
* 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>
2024-01-04 09:55:20 +00:00

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,
}
}