Add target parsing code for config (#9375)

This code is helper for mcs project
This commit is contained in:
Harshavardhana
2020-04-16 17:43:14 -07:00
committed by GitHub
parent 8bae956df6
commit d92db198d1
4 changed files with 155 additions and 30 deletions

View File

@@ -45,6 +45,15 @@ type HelpKV struct {
// HelpKVS - implement order of keys help messages.
type HelpKVS []HelpKV
// Keys returns help keys
func (h Help) Keys() []string {
var keys []string
for _, kh := range h.KeysHelp {
keys = append(keys, kh.Key)
}
return keys
}
// HelpConfigKV - return help for a given sub-system.
func (adm *AdminClient) HelpConfigKV(ctx context.Context, subSys, key string, envOnly bool) (Help, error) {
v := url.Values{}