Documentation ¶
Index ¶
- func CreateEmptyVolume(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID, name string) (*volume.Volume, error)
- func CreateVolumeByBranch(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID, branch string, ...) (*volume.Volume, error)
- func CreateVolumeFromSnapshot(mds metastore.Client, s datalayer.Storage, sid snapshot.ID, name string) (*volume.Volume, error)
- func DeleteBlob(mds metastore.Client, s datalayer.Storage, snapid snapshot.ID) error
- func DeleteBranch(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID, ...) error
- func DeleteVolume(mds metastore.Client, s datalayer.Storage, vid volume.ID) error
- func DeleteVolumeSet(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID) error
- func DownloadBlobDiff(mds metastore.Client, receiver BlobDownloader, vsid volumeset.ID, ...) error
- func Snapshot(mds metastore.Client, s datalayer.Storage, volid volume.ID, branchName string, ...) (*snapshot.Snapshot, error)
- func UploadBlobDiff(mds metastore.Store, sender BlobUploader, vsid volumeset.ID, base *snapshot.ID, ...) error
- type BlobDownloader
- type BlobUploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateEmptyVolume ¶
func CreateEmptyVolume(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID, name string) (*volume.Volume, error)
CreateEmptyVolume ...
func CreateVolumeByBranch ¶
func CreateVolumeByBranch(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID, branch string, name string) (*volume.Volume, error)
CreateVolumeByBranch ...
func CreateVolumeFromSnapshot ¶
func CreateVolumeFromSnapshot(mds metastore.Client, s datalayer.Storage, sid snapshot.ID, name string) (*volume.Volume, error)
CreateVolumeFromSnapshot ...
func DeleteBlob ¶
DeleteBlob ...
func DeleteBranch ¶
func DeleteBranch(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID, tip *branch.Branch) error
DeleteBranch deletes a branch identified by a branch's tip snapshot ID. This operation is only allowed on the client side and only on unsynced tip. This function doesn't check this and it is the caller's responsibility to verify that the tip is not synced. The branch is deleted from tip to the point where a split happens or all the way to the root. Either all of the snapshots are deleted or none is deleted. Blobs associated with the snapshots are also removed from the data storage layer.
func DeleteVolume ¶
DeleteVolume ...
func DeleteVolumeSet ¶
DeleteVolumeSet ...
func DownloadBlobDiff ¶
func DownloadBlobDiff( mds metastore.Client, receiver BlobDownloader, vsid volumeset.ID, base *snapshot.ID, target snapshot.ID, token string, dspuburl string, ) error
DownloadBlobDiff is the orchestrator of blob download. It finds the base blob is, download the diff and updates the newly downloaded blob's id in meta data store.
func Snapshot ¶
func Snapshot( mds metastore.Client, s datalayer.Storage, volid volume.ID, branchName string, syncMode metastore.SyncMode, name string, attrs attrs.Attrs, desc string, ) (*snapshot.Snapshot, error)
Snapshot takes a snapshot of a volume by ask storage layer to take a snapshot followed by updating meta data store
Types ¶
type BlobDownloader ¶
type BlobDownloader interface { DownloadBlobDiff( vsid volumeset.ID, ssid snapshot.ID, base blob.ID, token string, dspuburl string, ) (blob.ID, uint64, uint64, error) }
BlobDownloader receives a blob from the sender identified by the token, blob received is applied to the base. Returns the blob id of the newly received blob, size of the newly received blob and updated volume set total disk space usage.