Update docs/backend-system/building-plugins-and-modules/08-migrating.md

Signed-off-by: Johan Haals <johan.haals@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Johan Haals <johan@haals.se>
This commit is contained in:
Johan Haals
2023-01-18 14:57:23 +01:00
committed by GitHub
parent fc1e3897c3
commit 6487d9b260
@@ -81,7 +81,7 @@ backend.add(kubernetesPlugin);
There's one thing missing that those sharp eyed readers might have noticed: the `clusterSupplier` option is missing from the original plugin. Let's add it and discuss the alternatives.
One alternative is pass the `ClusterSupplier` in as options to the plugin which is quick and easy but not very flexible and hard to evolve without introducing breaking changes as it changes the public API for the plugin. Having complex types passed in directly to the plugin also clutters the backend setup code and makes it harder to read.
One alternative is to pass the `ClusterSupplier` in as options to the plugin, which is quick and easy but not very flexible, and also hard to evolve without introducing breaking changes as it changes the public API for the plugin. Having complex types passed in directly to the plugin also clutters the backend setup code and makes it harder to read.
Options are primarily used for simple configuration values that are not complex types. In this case we want to allow users to register their own `ClusterSupplier` implementations to the plugin. This is where the new backend system's [ExtensionPoints](fixme.md) but let's look at doing this with options first.