mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
Add plugin API versioning to plugin loader and plugins
This commit is contained in:
@@ -54,10 +54,10 @@ var (
|
||||
|
||||
// pluginInfo is the response returned for the PluginInfo RPC
|
||||
pluginInfo = &base.PluginInfoResponse{
|
||||
Type: base.PluginTypeDriver,
|
||||
PluginApiVersion: "0.0.1",
|
||||
PluginVersion: "0.1.0",
|
||||
Name: pluginName,
|
||||
Type: base.PluginTypeDriver,
|
||||
PluginApiVersions: []string{drivers.ApiVersion010},
|
||||
PluginVersion: "0.1.0",
|
||||
Name: pluginName,
|
||||
}
|
||||
|
||||
// configSpec is the hcl specification returned by the ConfigSchema RPC
|
||||
@@ -156,9 +156,9 @@ func (d *Driver) ConfigSchema() (*hclspec.Spec, error) {
|
||||
return configSpec, nil
|
||||
}
|
||||
|
||||
func (d *Driver) SetConfig(_ []byte, cfg *base.ClientAgentConfig) error {
|
||||
if cfg != nil {
|
||||
d.nomadConfig = cfg.Driver
|
||||
func (d *Driver) SetConfig(cfg *base.Config) error {
|
||||
if cfg != nil && cfg.AgentConfig != nil {
|
||||
d.nomadConfig = cfg.AgentConfig.Driver
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user