config: Add bytes JSON to storagepb.Group, parse YAML config

* Allow bootcfg groups metadata to be defined via YAML
* Convert YAML metadata to JSON bytes field in a protobuf message
* Strip metadata except strings, string slices, and string-keyed maps
with nesting
This commit is contained in:
Dalton Hubble
2016-03-09 02:23:56 -08:00
parent 81f7855099
commit 717a240b1d
7 changed files with 218 additions and 98 deletions

View File

@@ -74,7 +74,7 @@ func main() {
// storage
store := storage.NewFileStore(&storage.Config{
Dir: flags.dataPath,
Groups: cfg.PBGroups(),
Groups: cfg.Groups,
})
// gRPC Server

View File

@@ -103,7 +103,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
store.BootstrapGroups(cfg.Groups)
store.BootstrapGroups(cfg.YAMLGroups)
// HTTP server
config := &api.Config{