dataplane

package
v0.0.0-...-c5655c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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

func DeleteBlob(mds metastore.Client, s datalayer.Storage, snapid snapshot.ID) error

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

func DeleteVolume(mds metastore.Client, s datalayer.Storage, vid volume.ID) error

DeleteVolume ...

func DeleteVolumeSet

func DeleteVolumeSet(mds metastore.Client, s datalayer.Storage, vsid volumeset.ID) error

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

func UploadBlobDiff

func UploadBlobDiff(
	mds metastore.Store,
	sender BlobUploader,
	vsid volumeset.ID,
	base *snapshot.ID,
	target snapshot.ID,
	token string,
	dspuburl string,
) error

UploadBlobDiff ...

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.

type BlobUploader

type BlobUploader interface {
	UploadBlobDiff(
		vsid volumeset.ID,
		base blob.ID,
		blob blob.ID,
		token string,
		dspuburl string,
	) error
}

BlobUploader sends a local blob identified by delta of the blob id and the base blob id. The receiver of the blob is identified by the token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL