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

Function writeTenantBlocks

modules/backendscheduler/backendscheduler_test.go:312–332  ·  view source on GitHub ↗
(ctx context.Context, t *testing.T, w backend.Writer, tenant string, count int)

Source from the content-addressed store, hash-verified

310}
311
312func writeTenantBlocks(ctx context.Context, t *testing.T, w backend.Writer, tenant string, count int) []backend.UUID {
313 var (
314 err error
315 blockIDs []backend.UUID
316 )
317
318 for range count {
319 meta := &backend.BlockMeta{
320 BlockID: backend.NewUUID(),
321 TenantID: tenant,
322 Version: encoding.DefaultEncoding().Version(),
323 }
324
325 blockIDs = append(blockIDs, meta.BlockID)
326
327 err = w.WriteBlockMeta(ctx, meta)
328 require.NoError(t, err)
329 }
330
331 return blockIDs
332}
333
334type ownsEverythingSharder struct{}
335

Calls 4

NewUUIDFunction · 0.92
DefaultEncodingFunction · 0.92
VersionMethod · 0.65
WriteBlockMetaMethod · 0.65

Tested by

no test coverage detected