Documentation ¶
Overview ¶
Package restfulstorage is a package for remote access to metadata via a RESTful HTTP interface.
Index ¶
- type HubAddress
- type MetadataStorage
- func (rs *MetadataStorage) ExtendBranch(snapshots ...*snapshot.Snapshot) error
- func (rs *MetadataStorage) ForkBranch(branchName string, snapshots ...*snapshot.Snapshot) error
- func (rs *MetadataStorage) GetBranches(q branch.Query) ([]*branch.Branch, error)
- func (rs *MetadataStorage) GetSnapshotIDs(vsid volumeset.ID) ([]snapshot.ID, error)
- func (rs *MetadataStorage) GetSnapshots(q snapshot.Query) ([]*snapshot.Snapshot, error)
- func (rs *MetadataStorage) GetTip(vsid volumeset.ID, branch string) (*snapshot.Snapshot, error)
- func (rs *MetadataStorage) GetVolumeSets(q volumeset.Query) ([]*volumeset.VolumeSet, error)
- func (rs *MetadataStorage) ImportBranch(branchID branch.ID, branchName string, snapshots ...*snapshot.Snapshot) error
- func (rs *MetadataStorage) ImportVolumeSet(vs *volumeset.VolumeSet) error
- func (rs *MetadataStorage) OfferBlobDiff(vsid volumeset.ID, targetID snapshot.ID, baseCandidateIDs []snapshot.ID) (*snapshot.ID, string, string, error)
- func (rs *MetadataStorage) PullSnapshots(snaps []*metastore.SnapshotPair) ([]metastore.SnapMetaConflict, error)
- func (rs *MetadataStorage) PullVolumeSet(vsCur, vsInit *volumeset.VolumeSet) (metastore.VSMetaConflict, error)
- func (rs *MetadataStorage) RequestBlobDiff(vsid volumeset.ID, targetID snapshot.ID, baseCandidateIDs []snapshot.ID) (*snapshot.ID, string, string, error)
- func (rs *MetadataStorage) UpdateSnapshots(snaps []*metastore.SnapshotPair) ([]metastore.SnapMetaConflict, error)
- func (rs *MetadataStorage) UpdateVolumeSet(vsCur, vsInit *volumeset.VolumeSet) (metastore.VSMetaConflict, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HubAddress ¶
HubAddress is an encapsulation for an addess of a remote MDS. TODO: Remove this struct to directly access URL in MetadataStorage
type MetadataStorage ¶
type MetadataStorage struct {
// contains filtered or unexported fields
}
MetadataStorage is an implementation of MetadataStorage interface that acts as a proxy to another MetadataStorage implementation that is accessible via RESTful HTTP API.
func Create ¶
func Create(httpClient *protocols.Client, url *url.URL, vhut *cauthn.VHUT) (*MetadataStorage, error)
Create creates a new object with MetadataStorage interface that acts as a proxy to another MetadataStorage implementation that is accessible via RESTful HTTP API. Takes an initialized http.Client, leaving connection details out of scope. Probably needs an authorization token for performing various operations, to be added later.
func (*MetadataStorage) ExtendBranch ¶
func (rs *MetadataStorage) ExtendBranch(snapshots ...*snapshot.Snapshot) error
ExtendBranch ...
func (*MetadataStorage) ForkBranch ¶
func (rs *MetadataStorage) ForkBranch(branchName string, snapshots ...*snapshot.Snapshot) error
ForkBranch ...
func (*MetadataStorage) GetBranches ¶
GetBranches ...
func (*MetadataStorage) GetSnapshotIDs ¶
GetSnapshotIDs ...
func (*MetadataStorage) GetSnapshots ¶
GetSnapshots is a pass-through to Adapter's GetSnapshots. Note: caller is responsible for actually filtering output based on query.
func (*MetadataStorage) GetVolumeSets ¶
GetVolumeSets ...
func (*MetadataStorage) ImportBranch ¶
func (rs *MetadataStorage) ImportBranch(branchID branch.ID, branchName string, snapshots ...*snapshot.Snapshot) error
ImportBranch ...
func (*MetadataStorage) ImportVolumeSet ¶
func (rs *MetadataStorage) ImportVolumeSet(vs *volumeset.VolumeSet) error
ImportVolumeSet ...
func (*MetadataStorage) OfferBlobDiff ¶
func (rs *MetadataStorage) OfferBlobDiff(vsid volumeset.ID, targetID snapshot.ID, baseCandidateIDs []snapshot.ID) (*snapshot.ID, string, string, error)
OfferBlobDiff issues an HTTP request to a dataplane server for blob diff upload negotiation.
func (*MetadataStorage) PullSnapshots ¶
func (rs *MetadataStorage) PullSnapshots(snaps []*metastore.SnapshotPair) ([]metastore.SnapMetaConflict, error)
PullSnapshots implements metastore interface
func (*MetadataStorage) PullVolumeSet ¶
func (rs *MetadataStorage) PullVolumeSet(vsCur, vsInit *volumeset.VolumeSet) (metastore.VSMetaConflict, error)
PullVolumeSet implements the metastore interface
func (*MetadataStorage) RequestBlobDiff ¶
func (rs *MetadataStorage) RequestBlobDiff(vsid volumeset.ID, targetID snapshot.ID, baseCandidateIDs []snapshot.ID) (*snapshot.ID, string, string, error)
RequestBlobDiff issues an HTTP request to a dataplane server for blob diff download negotiation.
func (*MetadataStorage) UpdateSnapshots ¶
func (rs *MetadataStorage) UpdateSnapshots(snaps []*metastore.SnapshotPair) ([]metastore.SnapMetaConflict, error)
UpdateSnapshots implements metastore interface
func (*MetadataStorage) UpdateVolumeSet ¶
func (rs *MetadataStorage) UpdateVolumeSet(vsCur, vsInit *volumeset.VolumeSet) (metastore.VSMetaConflict, error)
UpdateVolumeSet ...