We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 55e865c + a62f925 commit b21a4e5Copy full SHA for b21a4e5
kube-runtime/src/watcher.rs
@@ -883,7 +883,7 @@ pub fn watch_object<K: Resource + Clone + DeserializeOwned + Debug + Send + 'sta
883
})
884
}
885
886
-struct ExponentialBackoff {
+pub struct ExponentialBackoff {
887
inner: backon::ExponentialBackoff,
888
builder: backon::ExponentialBuilder,
889
@@ -921,6 +921,15 @@ impl Iterator for ExponentialBackoff {
921
922
923
924
+impl From<backon::ExponentialBuilder> for ExponentialBackoff {
925
+ fn from(builder: backon::ExponentialBuilder) -> Self {
926
+ Self {
927
+ inner: builder.build(),
928
+ builder,
929
+ }
930
931
+}
932
+
933
/// Default watcher backoff inspired by Kubernetes' client-go.
934
///
935
/// The parameters currently optimize for being kind to struggling apiservers.
0 commit comments