restfulstorage

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: 15 Imported by: 2

Documentation

Overview

Package restfulstorage is a package for remote access to metadata via a RESTful HTTP interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HubAddress

type HubAddress struct {
	RootResource *url.URL
}

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

func (rs *MetadataStorage) GetBranches(q branch.Query) ([]*branch.Branch, error)

GetBranches ...

func (*MetadataStorage) GetSnapshotIDs

func (rs *MetadataStorage) GetSnapshotIDs(vsid volumeset.ID) ([]snapshot.ID, error)

GetSnapshotIDs ...

func (*MetadataStorage) GetSnapshots

func (rs *MetadataStorage) GetSnapshots(q snapshot.Query) ([]*snapshot.Snapshot, error)

GetSnapshots is a pass-through to Adapter's GetSnapshots. Note: caller is responsible for actually filtering output based on query.

func (*MetadataStorage) GetTip

func (rs *MetadataStorage) GetTip(vsid volumeset.ID, branch string) (*snapshot.Snapshot, error)

GetTip ...

func (*MetadataStorage) GetVolumeSets

func (rs *MetadataStorage) GetVolumeSets(q volumeset.Query) ([]*volumeset.VolumeSet, error)

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 ...

Jump to

Keyboard shortcuts

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