snabb
snabb copied to clipboard
core.app: add a post_link() app method
The existing link() method is called for all add/remove actions per link. In some cases, it is convenient or even necessary to let an app perform actions after link configuration is completed but before the app is run. The method is only invoked when at least one link was changed (added or removed).
Looks about right but also needs support in apps/config
.
Ok. Unfortunately, apps/config
is terra incognita for me (still living in the stone age of app configuration).
@wingo Could I possibly test/merge this as-is? Support in apps/config (which I believe is in flux?) could be added later on. I would add a note to https://github.com/snabbco/snabb/blob/master/src/apps/config/README.md explaining that post_link
is not yet supported?
Rationale: this seems already useful for downstream projects that don’t use apps/config