-
Notifications
You must be signed in to change notification settings - Fork 262
Add Version information to plugin APIs #318
Conversation
Please sign your commits following these rules: $ git clone -b "api-version" git@github.com:wfarner/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354112880
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
Current coverage is 67.89% (diff: 91.11%)@@ master #318 diff @@
==========================================
Files 12 30 +18
Lines 610 1545 +935
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 319 1049 +730
- Misses 246 396 +150
- Partials 45 100 +55
|
|
||
handshakeResult *handshakeResult | ||
|
||
// lock guards handshakeComplete |
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.
The comment - do you mean handshakeResult
?
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.
Yep, thanks. Fixing.
Signed-off-by: Bill Farner <bill@docker.com>
Signed-off-by: Bill Farner <bill@docker.com>
Signed-off-by: Bill Farner <bill@docker.com>
@@ -0,0 +1,16 @@ | |||
package spi |
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.
As a nit -- would you mind rename API
to something like Interface
? API
looks jarring when there are names like APIsRequest
and APIsResponse
or APIs()
.
Also for the method names APIs()
, Implements()
looks a little nicer to me. It also matches how Docker engine does activation with the field Implements
: https://docs.docker.com/engine/extend/plugin_api/#/pluginactivate
So how about
type Interface struct {
Name string
Version string
}
type Plugin interface {
Implements() ([]Interface, error)
}
Then the RPC response can be named HandshakeResponse
and it will look like
{
"Implements" : [ ....]
"Interfaces" : [ /* list of interface descriptions like example input / output via reflection */ ]
}
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.
No strong opinions here, the names you gave sound fine to me.
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.
Thank you for the flexibility. I agonize over naming and shape of characters when they are laid out next to each other.
Signed-off-by: Bill Farner <bill@docker.com>
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
…int /metaz to return version and api information Signed-off-by: David Chung <david.chung@docker.com>
Rollback to beta5 on Azure for docs
Publishing just to share the approach taken so far. Feedback welcome.
Closes #309