Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkg/proxy/config_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ func GetConfigMapByKeys(ctx context.Context, keys []string) (out map[string]stri
}
return
}

// GetConfigValueByKey 通过key获取配置值(从缓存获取)
func GetConfigValueByKey(ctx context.Context, key string) (value string, err error) {
config, err := service.ConfigData().GetByKey(ctx, key)
if err != nil {
return
}
value = config.ConfigValue
return
}