S3 driver refactor

This requires some discussion of how we will handle errors due to network problems
and after further changes in that direction some more stress testing. There is also an
upcomming commit implementing zero fill on WriteStream when offset is greater than
the current size of the file.
This commit is contained in:
Andrey Kostov
2014-12-19 19:16:51 +02:00
parent e8650d20a1
commit 8ca960a0b5
4 changed files with 262 additions and 130 deletions

View File

@@ -49,8 +49,6 @@ type StorageDriver interface {
// WriteStream stores the contents of the provided io.ReadCloser at a
// location designated by the given path.
// The driver will know it has received the full contents when it has read
// "size" bytes.
// May be used to resume writing a stream by providing a nonzero offset.
// The offset must be no larger than the CurrentSize for this path.
WriteStream(path string, offset int64, reader io.Reader) (nn int64, err error)