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

Method DeleteVersioned

tempodb/backend/gcs/gcs.go:426–437  ·  view source on GitHub ↗
(ctx context.Context, name string, keypath backend.KeyPath, version backend.Version)

Source from the content-addressed store, hash-verified

424}
425
426func (rw *readerWriter) DeleteVersioned(ctx context.Context, name string, keypath backend.KeyPath, version backend.Version) error {
427 keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)
428 o := rw.bucket.Object(backend.ObjectFileName(keypath, name))
429
430 preconditions, err := createPreconditions(version)
431 if err != nil {
432 return err
433 }
434 o = o.If(preconditions)
435
436 return o.Delete(ctx)
437}
438
439func (rw *readerWriter) ReadVersioned(ctx context.Context, name string, keypath backend.KeyPath) (io.ReadCloser, backend.Version, error) {
440 keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)

Callers

nothing calls this directly

Calls 4

KeyPathWithPrefixFunction · 0.92
ObjectFileNameFunction · 0.92
createPreconditionsFunction · 0.85
DeleteMethod · 0.65

Tested by

no test coverage detected