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

Function newSafeBuilderPool

modules/generator/registry/builder.go:14–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12}
13
14func newSafeBuilderPool() *safeBuilderPool {
15 return &safeBuilderPool{
16 pool: sync.Pool{
17 New: func() interface{} {
18 return labels.NewBuilder(labels.New())
19 },
20 },
21 }
22}
23
24func (p *safeBuilderPool) Get() *labels.Builder {
25 return p.pool.Get().(*labels.Builder)

Callers 2

TestSafeBuilderPoolFunction · 0.85
builder.goFile · 0.85

Calls

no outgoing calls

Tested by 1

TestSafeBuilderPoolFunction · 0.68