Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadToken ¶
type DownloadToken struct { // RemoteBaseBlobID identifies the blob on the sending side on which // the diff will be based. This doesn't change the receiving side's // behavior but the sending side needs to know this value to generate // the diff. RemoteBaseBlobID blob.ID // RemoteTargetBlobID identifies the blob on the sending side which // will be the target of the diff. This doesn't change the receiving // side's behavior but the sending side needs to know this value to // generate the diff. RemoteTargetBlobID blob.ID // ExpirationTime lets data layer reject stale downloads cheaply. ExpirationTime time.Time }
DownloadToken contains parameters which all the download of a single blob diff which can be applied onto a pre-negotiated blob on the local data layer to create a blob which contains the data for a particular pre-negotiated snapshot.
func NewDownloadToken ¶
func NewDownloadToken( base, target blob.ID, expiresInSecond time.Duration, ) DownloadToken
NewDownloadToken returns a new upload token
type Key ¶
type Key string
Key is a network transferable version of a token; it has two parts: 1. Data server's IP address or name 2. Encrypted UploadToken/DownloadToken
type UploadToken ¶
type UploadToken struct { // VolumeSetID is the volume set ID the blob belongs to VolSetID volumeset.ID // SnapshotID is the snapshot ID the blob belongs to SnapshotID snapshot.ID // BaseBlobID identifies the blob on the receiving side // where the diff can be applied. This doesn't change the sending // side's behavior but the receiving side needs to know which blob to // apply the diff to. BaseBlobID blob.ID // ExpirationTime lets data layer reject stale uploads cheaply (without // talking to data plane, without actually accepting the blob diff). // An optimization / some minor protection against a DoS. // // Data layer and data plane should have sync'd clocks. ExpirationTime time.Time }
UploadToken contains parameters which allow the upload of a single blob diff which can be applied onto a pre-negotiated blob on a particular remote data layer server to create a blob which contains the data for a particular pre-negotiated snapshot. Note: The fields are exported because it is need for GOB encoding/decoding