Pass plugin config via stdin#776
Merged
carolynvs merged 3 commits intogetporter:masterfrom Oct 29, 2019
Merged
Conversation
Member
Author
|
/azp run porter |
|
No pipelines are associated with this pull request. |
b01ccc9 to
3cb5cce
Compare
vdice
approved these changes
Oct 29, 2019
Member
vdice
left a comment
There was a problem hiding this comment.
LGTM.
Should we add some sample porter configs to the docs? Or hold off, perhaps if more updates are planned?
Member
Author
|
I was going to hold off until someone can install a plugin without having to compile it themselves. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change
Reads optional configuration from the porter configuration file and passes it to the plugin on stdin as json.
It is not sent as part of the plugin interface/contract because each plugin may or may not have config, it may look completely different or be loaded from other places, and I'd like to have the plugin contract mimic the cnab contracts. For example the interface for claims is the CrudStore.
What issue does it fix
N/A
Notes for the reviewer
This relies on a patch: hashicorp/go-plugin#127
This is the first step in getting a general framework in place for plugins. Next steps after this will be to make the pluginProvider generic so it can load a plugin and config for any interface. Right now I'm just feeling out what works.