From c3edf8305343e1e7e3d9fe3e3efee9d5eed42afe Mon Sep 17 00:00:00 2001 From: disksing Date: Wed, 8 May 2024 18:31:36 +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 750a3c6e48f8..54bddb3e1b7c 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.