MCPcopy
hub / github.com/grafana/tempo / instanceForTenant

Method instanceForTenant

modules/blockbuilder/partition_writer.go:136–152  ·  view source on GitHub ↗
(tenant string)

Source from the content-addressed store, hash-verified

134}
135
136func (p *writer) instanceForTenant(tenant string) (*tenantStore, error) {
137 p.mtx.Lock()
138 defer p.mtx.Unlock()
139
140 if i, ok := p.m[tenant]; ok {
141 return i, nil
142 }
143
144 i, err := newTenantStore(tenant, p.partition, p.startOffset, p.startTime, p.cycleDuration, p.slackDuration, p.blockCfg, p.logger, p.wal, p.enc, p.overrides)
145 if err != nil {
146 return nil, err
147 }
148
149 p.m[tenant] = i
150
151 return i, nil
152}
153
154func idsToString(ids [][]byte) string {
155 b := strings.Builder{}

Callers 1

pushBytesMethod · 0.95

Calls 1

newTenantStoreFunction · 0.85

Tested by

no test coverage detected