bulb/state-config_diff_model.md

31 lines
959 B
Markdown
Raw Permalink Normal View History

2022-12-01 08:25:08 -06:00
+-------+ +--------+
| State | | Config | Phase 1
+-------+ +--------+
| ||
V \/
+-------+ +-------+
| Repo1 | | Repo1 |
| Repo2 | | Repo2 |
| Repo3 | | Repo3 |
| Repo4 | | Repo5 |
+-------+ +-------+
||
|| Phase 1.5
\/
+-------+ +--------+
| State | | Config | Phase 2
+-------+ +--------+
| ||
V \/
+-------+ +-------+
| Repo1 | | Repo1 |
| Repo2 | | Repo2 |
| Repo3 | | Repo3 |
| Repo5 | | Repo5 |
+-------+ +-------+
Internally in phase 1.5, Config compares itself to State, removes keys that are in State and then installs plugins that are not in State
Config also modifies State by removing the keys that aren't in Config
Note: Config never modifies itself or State manually, instead delegating that work to the install() and uninstall() functions