-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudio.go
More file actions
24 lines (19 loc) · 1.04 KB
/
cloudio.go
File metadata and controls
24 lines (19 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package test
import "io"
// CloudIO defines the ioengine interfaces
type CloudIO interface {
PutBucket(bkname string) (status int, errmsg string)
DeleteBucket(bkname string) (status int, errmsg string)
GetBucket(bkname string) (body io.Reader, status int, errmsg string)
HeadBucket(bkname string) (status int, errmsg string)
IsDataBlockExist(md5str string) bool
WriteDataBlock(buf []byte, md5str string) (status int, errmsg string)
ReadDataBlockRange(md5str string, off int64, b []byte) (n int, status int, errmsg string)
// to reduce the bucket list latency, WriteObjectMD should store the default
// list metadata as the usermd of S3 object. So bucket list doesn't need to
// fetch the content of every object.
WriteObjectMD(bkname string, objname string, mdbuf []byte) (status int, errmsg string)
ReadObjectMD(bkname string, objname string) (b []byte, status int, errmsg string)
WriteDataPart(bkname string, partName string, b []byte) (status int, errmsg string)
ReadDataPart(bkname string, partName string) (b []byte, status int, errmsg string)
}