From 1ffffc24cd63ff25b24bf07a2bf8dd37673392ad Mon Sep 17 00:00:00 2001 From: disksing Date: Thu, 9 May 2024 00:08:38 +0800 Subject: [PATCH] resource_group: export DegradeModeWaitDuration (#8156) ref tikv/pd#4399 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.