To be implemented later, but adding now so googledrive's blob storage implementation
can depend on them.
Change-Id: Ief374e8592bd696c79aa2b80ded11e301063750b
Related changes:
Split docker-related test-helper functions from pkg/sorted/mongo.
These helper functions are now also used in the pkg/blobserver/mongo
tests too.
Also fixed a typo in a comment in pkg/blob/fetcher.go and a missing variable in
debug output in pkg/blobserver/storagetest/storagetest.go
Addresses http://camlistore.org/issue/127
Change-Id: I8b6f57f9ced066d6f83788fdcc87be6619c65c3c
Conflicts:
pkg/blob/fetcher.go
StreamingFetcher is now just Fetcher, and its FetchStreaming is now
just Fetch.
SeekFetcher is gone. Blobs are max 16 MB anyway, so we can slurp to
memory when needed. The main thing that cared about SeekFetcher
was the GET handler, ServeBlobref, because http.ServeContent needed
one for range requests. That's rewritten in an earlier commit, using
the FakeSeeker from another earlier commit.
Lot of code got simpler as a result.
Change-Id: Ib819413e48a8f9b8d97f596d0fbf771dab211f11
Not just in blob.SizedRef, but in blobserver.Fetch and
blobserver.FetchStreaming, too.
Blobs have a max size of 10-32 MB anyway, and the index.Corpus is now using
uint32 to save memory.
Change-Id: I1172445c2f9463fdaee55bfe0f1218d44be4aa53
As blob.fetcherToSeekerWrapper.Fetch erroneously asserts that FetchStreaming
returns a ReadSeekCloser everytime, it had to be changed.
Move MaxBlobSize from blobserver to constants (new package).
Change-Id: I4b4f22c302cbec84d77d21454e0c9e8aebdf73e5
This new type (blob.Blob) will be used to implement a blob streaming
interface for the storage engines.
Change-Id: I05f3a68022368cf9c7b4a98cced3098ba3965799
BenchmarkParseBlob 2000000 727 ns/op 64 B/op 2 allocs/op
BenchmarkParseBlob 5000000 531 ns/op 64 B/op 2 allocs/op
Kinda pointless and mostly the result of a failed refactor anyway,
but checking it in.
Change-Id: I7cdd0a8c5d03d7e223626ef6ddb77d8d10dd06a7
Shorter name (blob.Ref instead of *blobref.BlobRef) and value
semantics instead of pointer.
Also, equality (==) works on it, so it can be used as a map key.
It's also more memory efficient, for the upcoming search server that
needs to store tons (or all) of your blobrefs in memory.
Change-Id: I494a2d72d31865211fa388fedf938ed25f99ca13