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

Method writeSeedFile

pkg/usagestats/reporter.go:239–245  ·  view source on GitHub ↗

writeSeedFile writes the cluster seed to the object store.

(ctx context.Context, seed ClusterSeed)

Source from the content-addressed store, hash-verified

237
238// writeSeedFile writes the cluster seed to the object store.
239func (rep *Reporter) writeSeedFile(ctx context.Context, seed ClusterSeed) error {
240 data, err := JSONCodec.Encode(seed)
241 if err != nil {
242 return err
243 }
244 return rep.writer.Write(ctx, backend.ClusterSeedFileName, []string{}, bytes.NewReader(data), int64(len(data)), nil)
245}
246
247// running inits the reporter seed and start sending report for every interval
248func (rep *Reporter) running(ctx context.Context) error {

Callers 1

initLeaderMethod · 0.95

Calls 2

EncodeMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected