tier: support remote file attributes and remember the file extension

This commit is contained in:
Chris Lu
2019-12-25 21:37:21 -08:00
parent 997f5ead93
commit 48d28d3eb2
6 changed files with 214 additions and 185 deletions

View File

@@ -24,7 +24,7 @@ type BackendStorageFile interface {
type BackendStorage interface {
ToProperties() map[string]string
NewStorageFile(key string, tierInfo *volume_server_pb.VolumeTierInfo) BackendStorageFile
CopyFile(f *os.File, fn func(progressed int64, percentage float32) error) (key string, size int64, err error)
CopyFile(f *os.File, attributes map[string]string, fn func(progressed int64, percentage float32) error) (key string, size int64, err error)
DownloadFile(fileName string, key string, fn func(progressed int64, percentage float32) error) (size int64, err error)
DeleteFile(key string) (err error)
}