MCPcopy
hub / github.com/perkeep/perkeep / BlobRef

Method BlobRef

pkg/test/blob.go:60–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60func (tb *Blob) BlobRef() blob.Ref {
61 h := blob.NewHash()
62 io.WriteString(h, tb.Contents)
63 return blob.RefFromHash(h)
64}
65
66func (tb *Blob) SizedRef() blob.SizedRef {
67 return blob.SizedRef{Ref: tb.BlobRef(), Size: tb.Size()}

Callers 15

TestDoubleReceiveFunction · 0.95
TestCloseFunction · 0.95
TestIsolationFunction · 0.95
TestEnumerateFunction · 0.95
TestOptFunction · 0.95
testSubFetcherMethod · 0.95
TestShardFunction · 0.95
TestArchiverFunction · 0.95
TestArchiverStressFunction · 0.95
TestReceiveStatFunction · 0.95

Calls 2

NewHashFunction · 0.92
RefFromHashFunction · 0.92

Tested by 15

TestDoubleReceiveFunction · 0.76
TestCloseFunction · 0.76
TestIsolationFunction · 0.76
TestEnumerateFunction · 0.76
TestOptFunction · 0.76
TestShardFunction · 0.76
TestArchiverFunction · 0.76
TestArchiverStressFunction · 0.76
TestReceiveStatFunction · 0.76
TestMultiStatFunction · 0.76