Add v2 server config support with plugin URIs

Closes #3210

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-06-04 17:55:58 +00:00
parent 42f4bb98ac
commit 9547d269a1
10 changed files with 147 additions and 33 deletions

View File

@@ -60,7 +60,7 @@ var configCommand = cli.Command{
if p.Config == nil {
continue
}
config.Plugins[p.ID] = p.Config
config.Plugins[p.URI()] = p.Config
}
}
_, err = config.WriteTo(os.Stdout)

View File

@@ -23,8 +23,9 @@ import (
func defaultConfig() *srvconfig.Config {
return &srvconfig.Config{
Root: defaults.DefaultRootDir,
State: defaults.DefaultStateDir,
Version: 2,
Root: defaults.DefaultRootDir,
State: defaults.DefaultStateDir,
GRPC: srvconfig.GRPCConfig{
Address: defaults.DefaultAddress,
MaxRecvMsgSize: defaults.DefaultMaxRecvMsgSize,

View File

@@ -25,8 +25,9 @@ import (
func defaultConfig() *srvconfig.Config {
return &srvconfig.Config{
Root: defaults.DefaultRootDir,
State: defaults.DefaultStateDir,
Version: 2,
Root: defaults.DefaultRootDir,
State: defaults.DefaultStateDir,
GRPC: srvconfig.GRPCConfig{
Address: defaults.DefaultAddress,
},

View File

@@ -23,8 +23,9 @@ import (
func defaultConfig() *srvconfig.Config {
return &srvconfig.Config{
Root: defaults.DefaultRootDir,
State: defaults.DefaultStateDir,
Version: 2,
Root: defaults.DefaultRootDir,
State: defaults.DefaultStateDir,
GRPC: srvconfig.GRPCConfig{
Address: defaults.DefaultAddress,
MaxRecvMsgSize: defaults.DefaultMaxRecvMsgSize,