clarify Get() error requirement

This commit is contained in:
Alex Grintsvayg 2020-10-29 14:22:58 -04:00
parent 560e180e36
commit 72571236ab
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -9,15 +9,15 @@ import (
type BlobStore interface {
// Name of blob store (useful for metrics)
Name() string
// Does blob exist in the store
// Does blob exist in the store.
Has(hash string) (bool, error)
// Get the blob from the store
// Get the blob from the store. Must return ErrBlobNotFound if blob is not in store.
Get(hash string) (stream.Blob, error)
// Put the blob into the store
// Put the blob into the store.
Put(hash string, blob stream.Blob) error
// Put an SD blob into the store
// Put an SD blob into the store.
PutSD(hash string, blob stream.Blob) error
// Delete the blob from the store
// Delete the blob from the store.
Delete(hash string) error
}