Move proxy and plugin status from shell to Go

In the process we stop printing out the `PLUGIN_FULL_NAME`, but that
is assumed to be something the user can figure out from `docker plugin ls`
This commit is contained in:
Bryan Boreham committed 2017-05-17 09:27:22 +00:00
1 parent 3025738377
commit b0da4f6b91
5 files changed
+63 -18

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package plugin
type Status struct {
DriverName string
MeshDriverName string `json:"MeshDriverName,omitempty"`
Version int
}
func NewStatus(address, meshAddress string, isPluginV2 bool) *Status {
status := &Status{
DriverName: pluginNameFromAddress(address),
MeshDriverName: pluginNameFromAddress(meshAddress),
Version: 1,
}
if isPluginV2 {
status.Version = 2
}
return status
}