MCPcopy
hub / github.com/perkeep/perkeep / meta

Method meta

pkg/blobserver/diskpacked/diskpacked.go:728–741  ·  view source on GitHub ↗

meta fetches the metadata for the specified blob from the index.

(br blob.Ref)

Source from the content-addressed store, hash-verified

726
727// meta fetches the metadata for the specified blob from the index.
728func (s *storage) meta(br blob.Ref) (m blobMeta, err error) {
729 ms, err := s.index.Get(br.String())
730 if err != nil {
731 if errors.Is(err, sorted.ErrNotFound) {
732 err = os.ErrNotExist
733 }
734 return
735 }
736 m, ok := parseBlobMeta(ms)
737 if !ok {
738 err = fmt.Errorf("diskpacked: bad blob metadata: %q", ms)
739 }
740 return
741}
742
743// blobMeta is the blob metadata stored in the index.
744type blobMeta struct {

Callers 4

deleteMethod · 0.95
fetchMethod · 0.95
StatBlobsMethod · 0.95
ReceiveBlobMethod · 0.95

Calls 3

parseBlobMetaFunction · 0.85
GetMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected