Report plugin version status via the Config object

This commit is contained in:
Bryan Boreham committed 2017-05-17 09:28:34 +00:00
1 parent 4f485f856b
commit 933b395de4
2 files changed
+6 -7

No files matched your search

+2 -5
View File
@@ -1,9 +1,9 @@
package plugin
type Status struct {
Config Config
DriverName string
MeshDriverName string `json:"MeshDriverName,omitempty"`
Version int
}
func (plugin *Plugin) NewStatus() *Status {
@@ -13,10 +13,7 @@ func (plugin *Plugin) NewStatus() *Status {
status := &Status{
DriverName: pluginNameFromAddress(plugin.Socket),
MeshDriverName: pluginNameFromAddress(plugin.MeshSocket),
Version: 1,
}
if plugin.EnableV2 {
status.Version = 2
Config: plugin.Config,
}
return status
}