mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 06:15:45 +00:00
Improve RetryError GoDocs
This commit is contained in:
parent
fc8b4657c1
commit
18e978a89d
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2020 The Kubernetes Authors.
|
Copyright 2022 The Kubernetes Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@ -16,10 +16,12 @@ limitations under the License.
|
|||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import "time"
|
import (
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
// RetryError indicates after what time a service reconciliation should be
|
// RetryError indicates that a service reconciliation should be retried after a
|
||||||
// retried.
|
// fixed duration (as opposed to backing off exponentially).
|
||||||
type RetryError struct {
|
type RetryError struct {
|
||||||
msg string
|
msg string
|
||||||
retryAfter time.Duration
|
retryAfter time.Duration
|
||||||
@ -33,6 +35,7 @@ func NewRetryError(msg string, retryAfter time.Duration) *RetryError {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Error shows the details of the retry reason.
|
||||||
func (re *RetryError) Error() string {
|
func (re *RetryError) Error() string {
|
||||||
return re.msg
|
return re.msg
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user