Embed NoopNetworkPlugin into other network plugins

Let Noop handle common functions.
This commit is contained in:
Dan Williams
2016-03-22 11:38:21 -05:00
parent be8ce6c385
commit f1323103db
5 changed files with 15 additions and 16 deletions

View File

@@ -72,6 +72,8 @@ import (
)
type execNetworkPlugin struct {
network.NoopNetworkPlugin
execName string
execPath string
host network.Host
@@ -120,9 +122,6 @@ func (plugin *execNetworkPlugin) getExecutable() string {
return path.Join(plugin.execPath, execName)
}
func (plugin *execNetworkPlugin) Event(name string, details map[string]interface{}) {
}
func (plugin *execNetworkPlugin) Name() string {
return plugin.execName
}