Add bufplugin.RunnerProvider for remote plugins #3548
Merged
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.
This adds a new bufplugin.RunnerProvider to support remote wasm plugins. The constructor
bufcheck.NewRunnerProvider
has been renamed toNewLocalRunnerProvider
to clarify the runner interacts with the local filesystem when invoking plugins. It now takes abufplugin.PluginKeyProvider
andbufplugin.PluginDataProvider
to resolve and load remote plugin references.This also changes the PluginConfig to fix arguments for different plugin types. The method Path has been split into Name and Args. This is analogous to the naming in the std libraries
exec.Command
function. Name must not be empty. Args may be nil, but are valid for all plugin types. The name is either the path to the binary, the path to the wasm binary, or the fullname of the plugin in the form remote/owner/name.Subset of #3524