-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add support for proxy differ #8399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Derek McGowan <[email protected]>
Signed-off-by: Derek McGowan <[email protected]>
|
cc @wllenyj |
|
|
||
| // NewDiffApplier returns a new comparer and applier which communicates | ||
| // over a GRPC connection. | ||
| func NewDiffApplier(client diffapi.DiffClient) interface{} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boring go nit: Given we list 1.19 in our go.mod, should we use any for all interface{} uses from now on?
dcantah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work locally with a dummy test, LGTM
mxpv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds support for the "diff" type proxy plugin. This allows for out of process diff plugins to be used using the existing proxy plugin framework. The
contribaddition makes it easier to implement such plugins, similar to thesnapshotserviceincontrib.Moves the client proxy out of the client package to a package under
diff, similar to our other client proxies.A simple example is at https://gist.github.com/dmcgowan/93a19e4183493b46c5bf8cc3d5be9e59
Since we already have support for multiple differs (similar to how we have support for multiple snapshotters), configuring is easy. Just add the proxy plugin and update the diff service to use it (add it before walking to try the proxy first).