From 54965dd868dfdf0ecf0d17c0201ca5ac41952360 Mon Sep 17 00:00:00 2001 From: disksing Date: Wed, 8 May 2024 18:34:55 +0800 Subject: [PATCH] resource_group: export DegradeModeWaitDuration Signed-off-by: disksing --- client/resource_group/controller/controller.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/resource_group/controller/controller.go b/client/resource_group/controller/controller.go index 79bd6a9c3a6..11ea3f7997d 100755 --- a/client/resource_group/controller/controller.go +++ b/client/resource_group/controller/controller.go @@ -117,6 +117,13 @@ func WithWaitRetryTimes(times int) ResourceControlCreateOption { } } +// WithDegradedModeWaitDuration is the option to set the wait duration for degraded mode. +func WithDegradedModeWaitDuration(d time.Duration) ResourceControlCreateOption { + return func(controller *ResourceGroupsController) { + controller.ruConfig.DegradedModeWaitDuration = d + } +} + var _ ResourceGroupKVInterceptor = (*ResourceGroupsController)(nil) // ResourceGroupsController implements ResourceGroupKVInterceptor.