mirror of https://github.com/halo-dev/halo
![]() #### What type of PR is this? /kind feature /area core /area plugin #### What this PR does / why we need it: This PR adds reconciliation mechanism for plugin. After that, we could define a `Reconciler<Request>` like the following when developing plugin: ```java @Slf4j @Component public class ApplicationReconciler implements Reconciler<Reconciler.Request> { @Override public Result reconcile(Request request) { log.info("Application {} changed.", request); return Result.doNotRetry(); } @Override public Controller setupWith(ControllerBuilder builder) { return builder .extension(new Application()) .workerCount(1) .build(); } } ``` You can reconcile any extensions as needed. Meanwhile, all plugins will be stopped when Halo is shutting down. #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3783 #### Does this PR introduce a user-facing change? ```release-note 支持在插件中定义 Reconciler ``` |
||
---|---|---|
.. | ||
src | ||
build.gradle |