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

Method init

pkg/usagestats/reporter.go:172–184  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

170}
171
172func (rep *Reporter) init(ctx context.Context) {
173 ctx, span := tracer.Start(ctx, "UsageReporter.init")
174 defer span.End()
175
176 if rep.conf.Leader {
177 rep.cluster = rep.initLeader(ctx)
178 return
179 }
180 // follower only wait for the cluster seed to be set.
181 // it will try forever to fetch the cluster seed.
182 seed, _ := rep.fetchSeed(ctx, nil)
183 rep.cluster = seed
184}
185
186// fetchSeed fetches the cluster seed from the object store and try until it succeeds.
187// continueFn allow you to decide if we should continue retrying. Nil means always retry

Callers 4

runningMethod · 0.95
Test_MemberlistFunction · 0.95
Test_LeaderElectionFunction · 0.95

Calls 3

initLeaderMethod · 0.95
fetchSeedMethod · 0.95
StartMethod · 0.65

Tested by 3

Test_MemberlistFunction · 0.76
Test_LeaderElectionFunction · 0.76