MCPcopy Index your code
hub / github.com/cortexproject/cortex / parseNamespace

Function parseNamespace

pkg/ruler/api.go:442–454  ·  view source on GitHub ↗

parseNamespace parses the namespace from the provided set of params, in this api these params are derived from the url path

(params map[string]string)

Source from the content-addressed store, hash-verified

440// parseNamespace parses the namespace from the provided set of params, in this
441// api these params are derived from the url path
442func parseNamespace(params map[string]string) (string, error) {
443 namespace, exists := params["namespace"]
444 if !exists {
445 return "", ErrNoNamespace
446 }
447
448 namespace, err := url.PathUnescape(namespace)
449 if err != nil {
450 return "", err
451 }
452
453 return namespace, nil
454}
455
456// parseGroupName parses the group name from the provided set of params, in this
457// api these params are derived from the url path

Callers 1

parseRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected