MCPcopy Index your code
hub / github.com/kopia/kopia / GetContent

Method GetContent

internal/cache/content_cache.go:56–62  ·  view source on GitHub ↗
(ctx context.Context, contentID string, blobID blob.ID, offset, length int64, output *gather.WriteBuffer)

Source from the content-addressed store, hash-verified

54}
55
56func (c *contentCacheImpl) GetContent(ctx context.Context, contentID string, blobID blob.ID, offset, length int64, output *gather.WriteBuffer) error {
57 if c.fetchFullBlobs {
58 return c.getContentFromFullBlob(ctx, blobID, offset, length, output)
59 }
60
61 return c.getContentFromFullOrPartialBlob(ctx, contentID, blobID, offset, length, output)
62}
63
64func (c *contentCacheImpl) getContentFromFullBlob(ctx context.Context, blobID blob.ID, offset, length int64, output *gather.WriteBuffer) error {
65 c.pc.exclusiveLock(string(blobID))

Callers

nothing calls this directly

Tested by

no test coverage detected