Basic file uploader implemetation. Does not wait for replication to finish.
diff --git a/chunk/chunk.go b/chunk/chunk.go
index 36efcce..438e355 100644
--- a/chunk/chunk.go
+++ b/chunk/chunk.go
@@ -1,13 +1,23 @@
package chunk
-import "io"
+import (
+ "io"
+
+ "pcloud/api"
+)
+
+type ChunkInfo struct {
+ Status api.ChunkStatus
+ Size int
+ Committed int
+}
type Chunk interface {
- SizeBytes() int
- ReadSeeker() io.ReadSeeker
- Writer() io.Writer
+ Stats() (ChunkInfo, error)
+ ReaderAt() io.ReaderAt
+ WriterAt() io.WriterAt
}
type ChunkFactory interface {
- New() Chunk
+ New(size int) Chunk
}