MCPcopy Create free account
hub / github.com/cortexproject/cortex / TenantID

Method TenantID

pkg/util/users/resolver.go:105–116  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

103}
104
105func (t *MultiResolver) TenantID(ctx context.Context) (string, error) {
106 orgIDs, err := t.TenantIDs(ctx)
107 if err != nil {
108 return "", err
109 }
110
111 if len(orgIDs) > 1 {
112 return "", user.ErrTooManyOrgIDs
113 }
114
115 return orgIDs[0], nil
116}
117
118func (t *MultiResolver) TenantIDs(ctx context.Context) ([]string, error) {
119 //lint:ignore faillint wrapper around upstream method

Callers

nothing calls this directly

Calls 1

TenantIDsMethod · 0.95

Tested by

no test coverage detected