File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -192,10 +192,17 @@ where
192192 . await
193193 }
194194
195- pub fn with_concurrency ( mut self , concurrency : u16 ) -> Self {
196- self . controller = self
197- . controller
198- . with_config ( kube_runtime:: Config :: default ( ) . concurrency ( concurrency) ) ;
195+ /// Allow configuring the underlying [`kube_runtime::Controller`]. For
196+ /// example, you can use
197+ /// `controller.with_controller(|controller| controller.with_config(Config::default().concurrency(10)))`
198+ /// to limit the created controller to reconciling 10 resources at once.
199+ pub fn with_controller < F > ( mut self , f : F ) -> Self
200+ where
201+ F : FnOnce (
202+ kube_runtime:: Controller < Ctx :: Resource > ,
203+ ) -> kube_runtime:: Controller < Ctx :: Resource > ,
204+ {
205+ self . controller = f ( self . controller ) ;
199206 self
200207 }
201208}
You can’t perform that action at this time.
0 commit comments