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

Method TenantID

pkg/util/users/resolver.go:46–46  ·  view source on GitHub ↗

TenantID returns exactly a single tenant ID from the context. It should be used when a certain endpoint should only support exactly a single tenant ID. It returns an error user.ErrNoOrgID if there is no tenant ID supplied or user.ErrTooManyOrgIDs if there are multiple tenant IDs present.

(context.Context)

Source from the content-addressed store, hash-verified

44 // tenant ID. It returns an error user.ErrNoOrgID if there is no tenant ID
45 // supplied or user.ErrTooManyOrgIDs if there are multiple tenant IDs present.
46 TenantID(context.Context) (string, error)
47
48 // TenantIDs returns all tenant IDs from the context. It should return
49 // normalized list of ordered and distinct tenant IDs (as produced by

Callers 3

testMethod · 0.65
TenantIDFunction · 0.65

Implementers 4

RegexResolverpkg/querier/tenantfederation/regex_res
RegexValidatorpkg/querier/tenantfederation/regex_res
SingleResolverpkg/util/users/resolver.go
MultiResolverpkg/util/users/resolver.go

Calls

no outgoing calls

Tested by 1

testMethod · 0.52