Skip to content

Commit

Permalink
tweak service_registration config
Browse files Browse the repository at this point in the history
  • Loading branch information
mjarmy committed Dec 4, 2019
1 parent 39fcede commit 5509920
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions command/server/config.go
Expand Up @@ -155,7 +155,7 @@ func (b *Storage) GoString() string {
// ServiceRegistration is the optional service discovery for the server.
type ServiceRegistration struct {
Type string
Config map[string]string
Config map[string]interface{}
}

func (b *ServiceRegistration) GoString() string {
Expand Down Expand Up @@ -864,7 +864,7 @@ func parseServiceRegistration(result *Config, list *ast.ObjectList, name string)
key = item.Keys[0].Token.Value().(string)
}

var m map[string]string
var m map[string]interface{}
if err := hcl.DecodeObject(&m, item.Val); err != nil {
return multierror.Prefix(err, fmt.Sprintf("%s.%s:", name, key))
}
Expand Down
8 changes: 4 additions & 4 deletions command/server/config_test_helpers.go
Expand Up @@ -49,7 +49,7 @@ func testLoadConfigFile_topLevel(t *testing.T, entropy *Entropy) {

ServiceRegistration: &ServiceRegistration{
Type: "consul",
Config: map[string]string{
Config: map[string]interface{}{
"foo": "bar",
},
},
Expand Down Expand Up @@ -135,7 +135,7 @@ func testLoadConfigFile_json2(t *testing.T, entropy *Entropy) {

ServiceRegistration: &ServiceRegistration{
Type: "consul",
Config: map[string]string{
Config: map[string]interface{}{
"foo": "bar",
},
},
Expand Down Expand Up @@ -277,7 +277,7 @@ func testLoadConfigFile(t *testing.T) {

ServiceRegistration: &ServiceRegistration{
Type: "consul",
Config: map[string]string{
Config: map[string]interface{}{
"foo": "bar",
},
},
Expand Down Expand Up @@ -347,7 +347,7 @@ func testLoadConfigFile_json(t *testing.T) {

ServiceRegistration: &ServiceRegistration{
Type: "consul",
Config: map[string]string{
Config: map[string]interface{}{
"foo": "bar",
},
},
Expand Down

0 comments on commit 5509920

Please sign in to comment.