diff --git a/lib/go/camli/blobref/fetcher.go b/lib/go/camli/blobref/fetcher.go index ce3eaf66d..9fbeafe42 100644 --- a/lib/go/camli/blobref/fetcher.go +++ b/lib/go/camli/blobref/fetcher.go @@ -18,6 +18,7 @@ package blobref import ( "fmt" + "io" "os" "path/filepath" ) @@ -29,6 +30,13 @@ type Fetcher interface { Fetch(*BlobRef) (file ReadSeekCloser, size int64, err os.Error) } +type StreamingFetcher interface { + // Fetch returns a blob. If the blob is not found then + // os.ENOENT should be returned for the error (not a wrapped + // error with a ENOENT inside) + FetchStreaming(*BlobRef) (file io.ReadCloser, size int64, err os.Error) +} + func NewSerialFetcher(fetchers ...Fetcher) Fetcher { return &serialFetcher{fetchers} }