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

Method writer

tempodb/backend/gcs/gcs.go:458–475  ·  view source on GitHub ↗
(ctx context.Context, name string, conditions *storage.Conditions)

Source from the content-addressed store, hash-verified

456}
457
458func (rw *readerWriter) writer(ctx context.Context, name string, conditions *storage.Conditions) *storage.Writer {
459 o := rw.bucket.Object(name)
460 if conditions != nil {
461 o = o.If(*conditions)
462 }
463 w := o.NewWriter(ctx)
464 w.ChunkSize = rw.cfg.ChunkBufferSize
465
466 if rw.cfg.ObjectMetadata != nil {
467 w.Metadata = rw.cfg.ObjectMetadata
468 }
469
470 if rw.cfg.ObjectCacheControl != "" {
471 w.CacheControl = rw.cfg.ObjectCacheControl
472 }
473
474 return w
475}
476
477func (rw *readerWriter) readAll(ctx context.Context, name string) ([]byte, *storage.ReaderObjectAttrs, error) {
478 r, err := rw.hedgedBucket.Object(name).NewReader(ctx)

Callers 3

WriteMethod · 0.95
AppendMethod · 0.95
WriteVersionedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected