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

Method Delete

tempodb/backend/azure/azure.go:155–168  ·  view source on GitHub ↗
(ctx context.Context, name string, keypath backend.KeyPath, _ *backend.CacheInfo)

Source from the content-addressed store, hash-verified

153}
154
155func (rw *Azure) Delete(ctx context.Context, name string, keypath backend.KeyPath, _ *backend.CacheInfo) error {
156 keypath = backend.KeyPathWithPrefix(keypath, rw.cfg.Prefix)
157
158 blobClient, err := getBlobClient(ctx, rw.cfg, backend.ObjectFileName(keypath, name))
159 if err != nil {
160 return fmt.Errorf("cannot get Azure blob client, name: %s: %w", backend.ObjectFileName(keypath, name), err)
161 }
162
163 snapshotType := blob.DeleteSnapshotsOptionTypeInclude
164 if _, err = blobClient.Delete(ctx, &blob.DeleteOptions{DeleteSnapshots: &snapshotType}); err != nil {
165 return readError(err)
166 }
167 return nil
168}
169
170// List implements backend.Reader
171func (rw *Azure) List(ctx context.Context, keypath backend.KeyPath) ([]string, error) {

Callers 3

MarkBlockCompactedMethod · 0.95
ClearBlockMethod · 0.95
DeleteVersionedMethod · 0.95

Calls 5

KeyPathWithPrefixFunction · 0.92
ObjectFileNameFunction · 0.92
getBlobClientFunction · 0.85
readErrorFunction · 0.70
DeleteMethod · 0.65

Tested by

no test coverage detected