blob: aaa1bfb8eac2fadc1000bd3d9e3242fb65900aa8 [file] [log] [blame]
giolekva892a4e22020-04-27 16:46:22 +04001package chunk
2
3import (
4 "io"
5
6 "github.com/giolekva/pcloud/pfs/api"
7)
8
9type ChunkInfo struct {
10 Status api.ChunkStatus
11 Size int
12 Committed int
13}
14
15type Chunk interface {
16 Stats() (ChunkInfo, error)
17 ReaderAt() io.ReaderAt
18 WriterAt() io.WriterAt
19}
20
21type ChunkFactory interface {
22 New(size int) Chunk
23}