add initial implementation of remote backing store

This commit implement the BackingStore Interface for remote backing
store.

Signed-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
This commit is contained in:
Utkarsh Mani Tripathi
2019-11-18 14:50:12 +05:30
parent 5d3d165c74
commit f3ef8c973d
3 changed files with 166 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ package api
import (
"errors"
"io"
"sync"
uuid "github.com/satori/go.uuid"
@@ -406,3 +407,14 @@ type UnmapBlockDescriptor struct {
Offset uint64
TL uint32
}
type ReaderWriterAt interface {
io.ReaderAt
io.WriterAt
}
type RemoteBackingStore interface {
ReaderWriterAt
Sync() (int, error)
Unmap(int64, int64) (int, error)
}