public class DefaultControllerBuilder extends Object
Modifier and Type | Method and Description |
---|---|
Controller |
build()
Build the controller.
|
<ApiType extends io.kubernetes.client.common.KubernetesObject> |
watch(Function<WorkQueue<Request>,ControllerWatch<ApiType>> controllerWatchGetter)
Starts building watches over resource.
|
DefaultControllerBuilder |
withName(String controllerName)
Overrides name for the controller.
|
DefaultControllerBuilder |
withReadyFunc(Supplier<Boolean> readyFunc)
Add a ready-function to the pre-flight check of the controller.
|
DefaultControllerBuilder |
withReadyTimeout(Duration readyTimeout) |
DefaultControllerBuilder |
withReconciler(Reconciler reconciler)
Sets reconciler of the controller.
|
DefaultControllerBuilder |
withWorkerCount(int workerCount)
Overrides worker thread counts of the controller.
|
DefaultControllerBuilder |
withWorkQueue(RateLimitingQueue<Request> workQueue)
Overrides workQueue for the controller.
|
public <ApiType extends io.kubernetes.client.common.KubernetesObject> DefaultControllerBuilder watch(Function<WorkQueue<Request>,ControllerWatch<ApiType>> controllerWatchGetter)
ApiType
- the type parameter for the singular responsecontrollerWatchGetter
- the controller watch getterpublic DefaultControllerBuilder withName(String controllerName)
controllerName
- the controller namepublic DefaultControllerBuilder withWorkQueue(RateLimitingQueue<Request> workQueue)
workQueue
- the work queuepublic DefaultControllerBuilder withReadyFunc(Supplier<Boolean> readyFunc)
readyFunc
- the ready funcpublic DefaultControllerBuilder withReadyTimeout(Duration readyTimeout)
public DefaultControllerBuilder withWorkerCount(int workerCount)
workerCount
- the worker countpublic DefaultControllerBuilder withReconciler(Reconciler reconciler)
reconciler
- the reconcilerpublic Controller build() throws IllegalStateException
IllegalStateException
- the illegal state exceptionCopyright © 2022. All rights reserved.