github.com/grafana/pyroscope@v1.18.0/pkg/objstore/user_bucket_client.go (about) 1 // SPDX-License-Identifier: AGPL-3.0-only 2 // Provenance-includes-location: https://github.com/cortexproject/cortex/blob/master/pkg/storage/bucket/user_bucket_client.go 3 // Provenance-includes-license: Apache-2.0 4 // Provenance-includes-copyright: The Cortex Authors. 5 6 package objstore 7 8 // NewTenantBucketClient returns a bucket client to use to access the storage on behalf of the provided user. 9 // The cfgProvider can be nil. 10 func NewTenantBucketClient(tenantID string, bucket Bucket, cfgProvider TenantConfigProvider) InstrumentedBucket { 11 // Inject the user/tenant prefix. 12 bucket = NewPrefixedBucket(bucket, tenantID+"/phlaredb") 13 14 // Inject the SSE config. 15 return NewSSEBucketClient(tenantID, bucket, cfgProvider) 16 }