MCPcopy
hub / github.com/perkeep/perkeep / BlobReceiver

Interface BlobReceiver

pkg/blobserver/interface.go:41–56  ·  view source on GitHub ↗

BlobReceiver is the interface for receiving blobs.

Source from the content-addressed store, hash-verified

39
40// BlobReceiver is the interface for receiving blobs.
41type BlobReceiver interface {
42 // ReceiveBlob accepts a newly uploaded blob and writes it to
43 // permanent storage.
44 //
45 // Implementations of BlobReceiver downstream of the HTTP
46 // server can trust that the source isn't larger than
47 // MaxBlobSize and that its digest matches the provided blob
48 // ref. (If not, the read of the source will fail before EOF)
49 //
50 // To ensure those guarantees, callers of ReceiveBlob should
51 // not call ReceiveBlob directly but instead use either
52 // blobserver.Receive or blobserver.ReceiveString, which also
53 // take care of notifying the BlobReceiver's "BlobHub"
54 // notification bus for observers.
55 ReceiveBlob(ctx context.Context, br blob.Ref, source io.Reader) (blob.SizedRef, error)
56}
57
58// BlobStatter is the interface for checking the size and existence of blobs.
59type BlobStatter interface {

Callers 8

ReceiveBlobMethod · 0.65
newSignerFunction · 0.65
addBlobMethod · 0.65
initTestsFunction · 0.65
receiveFunction · 0.65
TestDeleteFunction · 0.65
ReceiveBlobMethod · 0.65
TestOptFunction · 0.65

Implementers 15

Clientpkg/client/client.go
StatusReceiverpkg/client/android/androidx.go
NoImplStoragepkg/blobserver/noimpl.go
remoteStoragepkg/blobserver/remote/remote.go
storagepkg/blobserver/diskpacked/diskpacked.g
nstopkg/blobserver/namespace/ns.go
Storagepkg/blobserver/files/files.go
unionStoragepkg/blobserver/union/union.go
azureStoragepkg/blobserver/azure/azure.go
mongoStoragepkg/blobserver/mongo/mongo.go
Storagepkg/blobserver/memory/mem.go
replicaStoragepkg/blobserver/replica/replica.go

Calls

no outgoing calls

Tested by

no test coverage detected