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

Function TenantID

pkg/util/users/resolver.go:26–28  ·  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. ignore stu

(ctx context.Context)

Source from the content-addressed store, hash-verified

24//
25//nolint:revive
26func TenantID(ctx context.Context) (string, error) {
27 return defaultResolver.TenantID(ctx)
28}
29
30// TenantIDs returns all tenant IDs from the context. It should return
31// normalized list of ordered and distinct tenant IDs (as produced by

Callers 15

SignMethod · 0.92
newParquetBlockMethod · 0.92
DeleteTenantMethod · 0.92
DeleteTenantStatusMethod · 0.92
GetIngestersForQueryMethod · 0.92
PushMethod · 0.92
PushMethod · 0.92
GetUserConfigMethod · 0.92
SetUserConfigMethod · 0.92
DeleteUserConfigMethod · 0.92

Calls 1

TenantIDMethod · 0.65

Tested by 2

PushMethod · 0.74