mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
tweak service_registration config
This commit is contained in:
parent
39fcedec86
commit
5509920a8a
2 changed files with 6 additions and 6 deletions
|
|
@ -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))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue