Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateCorrelationID() string
- func GetCorrelationID(r *http.Request) string
- func SetCorrelationID(r *http.Request, correlationID string)
- type Client
- type ReqBlobID
- type ReqBranch
- type ReqDataServerStats
- type ReqDownloadToken
- type ReqDownloadTokenStatus
- type ReqExtendBranch
- type ReqForkBranch
- type ReqGetBranches
- type ReqGetSnapshotIDs
- type ReqGetSnapshots
- type ReqGetVolumeSets
- type ReqImportBranch
- type ReqSnapshot
- type ReqSnapshotID
- type ReqSyncBlob
- type ReqURL
- type ReqUpdateSnapshot
- type ReqUpdateSnapshots
- type ReqUpdateVolumeSet
- type ReqUploadToken
- type ReqUploadTokenStatus
- type ReqUsage
- type ReqVolSet
- type ReqVolSetID
- type RespDataServerStats
- type RespGetBranches
- type RespGetSnapshotIDs
- type RespGetSnapshots
- type RespGetTip
- type RespGetVolumeSets
- type RespSyncBlob
- type RespToken
- type RespUpdateSnapshot
- type RespUpdateSnapshots
- type RespUpdateVolumeSet
- type RespUsage
- type RespVolSet
Constants ¶
const ( // HTTPPathVersion indicates the version HTTPPathVersion = "v1" // HTTPPathVolumeSet get/create/delete volume set HTTPPathVolumeSet = "volumeset" // HTTPPathVolumeSets get all volume sets HTTPPathVolumeSets = "volumesets" // HTTPPathSnapshots get all snapshots HTTPPathSnapshots = "snapshots" // HTTPPathBranches get all branches HTTPPathBranches = "branches" // HTTPPathSnapshotIDs get all snapshot IDs HTTPPathSnapshotIDs = "snapshotids" // HTTPPathBlob ... HTTPPathBlob = "blob" // HTTPPathTip get tip of a branch HTTPPathTip = "tip" // HTTPPathImportBranch Import snapshots by importing a new branch HTTPPathImportBranch = "importbranch" // HTTPPathForkBranch Import snapshots by forking a new branch HTTPPathForkBranch = "forkbranch" // HTTPPathExtendBranch Import snapshots by extending an existing branch HTTPPathExtendBranch = "extendbranch" // HTTPPathOfferBlob offer to push a blob HTTPPathOfferBlob = "upload/blob" // HTTPPathRequestBlob request to pull a blob HTTPPathRequestBlob = "download/blob" // HTTPPathSnapshotByBranch obtains snapshots of a branch HTTPPathSnapshotByBranch = "snapshotsbybranch" // HTTPPathStats get stats HTTPPathStats = "stats" // HTTPPathNewDataServer put data server url HTTPPathNewDataServer = "dataserver" // HTTPPathUpdateVolumeSet ... HTTPPathUpdateVolumeSet = "update/volumeset" // HTTPPathPullVolumeSet ... HTTPPathPullVolumeSet = "pull/volumeset" // HTTPPathUpdateSnapshot ... HTTPPathUpdateSnapshot = "update/snapshot" // HTTPPathUpdateSnapshots ... HTTPPathUpdateSnapshots = "update/snapshots" // HTTPPathPullSnapshots ... HTTPPathPullSnapshots = "pull/snapshots" // HTTPReqUploadBlob upload a blob with token HTTPReqUploadBlob = "upload" // HTTPReqDownloadBlob download a blob with token HTTPReqDownloadBlob = "download" // HTTPFieldToken token field use as a parameter in blob upload/download requests HTTPFieldToken = "token" // HTTPPathUploadToken get upload token HTTPPathUploadToken = "upload/token" // HTTPPathDownloadToken get download token HTTPPathDownloadToken = "download/token" // HTTPPathUploadStatus upload status HTTPPathUploadStatus = "upload/status" // HTTPPathDownloadStatus download status HTTPPathDownloadStatus = "download/status" // HTTPPathAnalytics ... HTTPPathAnalytics = "analytics" )
const (
// HTTPPathUsage quries the usage given a list of volumesets.
HTTPPathUsage = "usage"
)
const VerifyCert = false
VerifyCert ..
Variables ¶
var ErrHTTPXferTimeout = "HTTP Transfer Timeout"
ErrHTTPXferTimeout transfer timed out error
Functions ¶
func GenerateCorrelationID ¶
func GenerateCorrelationID() string
GenerateCorrelationID generates a GUID.
func GetCorrelationID ¶
GetCorrelationID obtains the correlationID from the header.
func SetCorrelationID ¶
SetCorrelationID sets the correslation ID for the header.
Types ¶
type Client ¶
Client is a wrapper to the http.Client.
type ReqDataServerStats ¶
ReqDataServerStats returns stats of storage or a volume set If volume set id is given, it returns the stats of the volume set; otherwise, returns stats of the storage
type ReqDownloadToken ¶
ReqDownloadToken ...
type ReqDownloadTokenStatus ¶
ReqDownloadTokenStatus ..
type ReqExtendBranch ¶
ReqExtendBranch ..
type ReqForkBranch ¶
ReqForkBranch ..
type ReqGetSnapshotIDs ¶
ReqGetSnapshotIDs ..
type ReqImportBranch ¶
ReqImportBranch ..
type ReqSyncBlob ¶
type ReqSyncBlob struct { VolSetID volumeset.ID TargetID snapshot.ID BaseCandidateIDs []snapshot.ID }
ReqSyncBlob ..
type ReqUpdateSnapshot ¶
type ReqUpdateSnapshot struct { SnapInit *snapshot.Snapshot `json:"snap_init"` SnapCur *snapshot.Snapshot `json:"snap_cur"` }
ReqUpdateSnapshot ...
type ReqUpdateSnapshots ¶
type ReqUpdateSnapshots struct {
Snaps []*metastore.SnapshotPair `json:"snap_pairs"`
}
ReqUpdateSnapshots ...
type ReqUpdateVolumeSet ¶
type ReqUpdateVolumeSet struct { VolSetInit *volumeset.VolumeSet `json:"volset_init"` VolSetCur *volumeset.VolumeSet `json:"volset_cur"` }
ReqUpdateVolumeSet ...
type ReqUploadToken ¶
ReqUploadToken ...
type ReqUploadTokenStatus ¶
ReqUploadTokenStatus ..
type RespDataServerStats ¶
RespDataServerStats is the struct for reporting data server stats
type RespGetBranches ¶
type RespGetBranches struct { Total int `json:"total_branches"` Branches []*branch.Branch `json:"branches"` }
RespGetBranches ..
type RespGetSnapshotIDs ¶
RespGetSnapshotIDs ..
type RespGetSnapshots ¶
type RespGetSnapshots struct { Total int `json:"total_snapshots"` Snapshots []*snapshot.Snapshot `json:"snapshots"` }
RespGetSnapshots ..
type RespGetVolumeSets ¶
type RespGetVolumeSets struct { Total int `json:"total_volumesets"` VolumeSets []*volumeset.VolumeSet `json:"volumesets"` }
RespGetVolumeSets ..
type RespSyncBlob ¶
RespSyncBlob ..
type RespToken ¶
RespToken is the response from DS to DP when DP request either a upload or download token.
type RespUpdateSnapshot ¶
type RespUpdateSnapshot struct {
SnapMetaConfl metastore.SnapMetaConflict `json:"snap_meta_confl"`
}
RespUpdateSnapshot ..
type RespUpdateSnapshots ¶
type RespUpdateSnapshots struct {
SnapMetaConfls []metastore.SnapMetaConflict `json:"snap_meta_confls"`
}
RespUpdateSnapshots ..
type RespUpdateVolumeSet ¶
type RespUpdateVolumeSet struct {
VSMetaConfl metastore.VSMetaConflict `json:"vs_meta_confl"`
}
RespUpdateVolumeSet ..