tweak service_registration config

This commit is contained in:
Mike Jarmy 2019-12-04 09:39:57 -05:00
parent 39fcedec86
commit 5509920a8a
2 changed files with 6 additions and 6 deletions

View file

@ -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 {
@ -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))
}

View file

@ -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",
},
},
@ -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",
},
},
@ -277,7 +277,7 @@ func testLoadConfigFile(t *testing.T) {
ServiceRegistration: &ServiceRegistration{
Type: "consul",
Config: map[string]string{
Config: map[string]interface{}{
"foo": "bar",
},
},
@ -347,7 +347,7 @@ func testLoadConfigFile_json(t *testing.T) {
ServiceRegistration: &ServiceRegistration{
Type: "consul",
Config: map[string]string{
Config: map[string]interface{}{
"foo": "bar",
},
},