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

Function createPreconditions

tempodb/backend/gcs/gcs.go:570–582  ·  view source on GitHub ↗
(version backend.Version)

Source from the content-addressed store, hash-verified

568}
569
570func createPreconditions(version backend.Version) (preconditions storage.Conditions, err error) {
571 if version == backend.VersionNew {
572 preconditions.DoesNotExist = true
573 return
574 }
575
576 generation, err := strconv.ParseInt(string(version), 10, 64)
577 if err != nil {
578 return storage.Conditions{}, backend.ErrVersionInvalid
579 }
580 preconditions.GenerationMatch = generation
581 return
582}

Callers 2

WriteVersionedMethod · 0.85
DeleteVersionedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected