Documentation ¶
Index ¶
- Constants
- func GetSubvolume(fsType, varpath, serviceID string) (volume.Volume, error)
- func NewLabel(tenantID string) string
- type DatastoreGetter
- type DistributedFilesystem
- func (dfs *DistributedFilesystem) Backup(dirpath string, last int) (string, error)
- func (dfs *DistributedFilesystem) Commit(dockerID string) (string, error)
- func (dfs *DistributedFilesystem) DeleteSnapshot(snapshotID string) error
- func (dfs *DistributedFilesystem) DeleteSnapshots(tenantID string) error
- func (dfs *DistributedFilesystem) GetStatus(timeout time.Duration) string
- func (dfs *DistributedFilesystem) GetVolume(serviceID string) (volume.Volume, error)
- func (dfs *DistributedFilesystem) IsLocked() (bool, error)
- func (dfs *DistributedFilesystem) ListBackups(dirpath string) ([]dao.BackupFile, error)
- func (dfs *DistributedFilesystem) ListSnapshots(tenantID string) ([]dao.SnapshotInfo, error)
- func (dfs *DistributedFilesystem) Lock() error
- func (dfs *DistributedFilesystem) ResetRegistry() error
- func (dfs *DistributedFilesystem) Restore(filename string) error
- func (dfs *DistributedFilesystem) Rollback(snapshotID string, forceRestart bool) error
- func (dfs *DistributedFilesystem) Snapshot(tenantID string, description string) (string, error)
- func (dfs *DistributedFilesystem) Unlock() error
- type FileInfoSlice
- type ServiceVolumeGetter
- type SnapshotMetadata
Constants ¶
const (
DockerLatest = "latest"
)
Variables ¶
This section is empty.
Functions ¶
func GetSubvolume ¶
GetSubvolume gets the path of the *local* volume on the host
Types ¶
type DatastoreGetter ¶
type DistributedFilesystem ¶
type DistributedFilesystem struct {
// contains filtered or unexported fields
}
func NewDistributedFilesystem ¶
func NewDistributedFilesystem(fsType, varpath, dockerRegistry string, facade facade.FacadeInterface, timeout time.Duration) (*DistributedFilesystem, error)
func (*DistributedFilesystem) Backup ¶
func (dfs *DistributedFilesystem) Backup(dirpath string, last int) (string, error)
Backup backs up serviced, saving the last n snapshots
func (*DistributedFilesystem) Commit ¶
func (dfs *DistributedFilesystem) Commit(dockerID string) (string, error)
Commit will merge a container into existing services' image
func (*DistributedFilesystem) DeleteSnapshot ¶
func (dfs *DistributedFilesystem) DeleteSnapshot(snapshotID string) error
DeleteSnapshot deletes an existing snapshot as identified by its snapshotID
func (*DistributedFilesystem) DeleteSnapshots ¶
func (dfs *DistributedFilesystem) DeleteSnapshots(tenantID string) error
DeleteSnapshots deletes all snapshots relating to a particular tenantID
func (*DistributedFilesystem) GetStatus ¶
func (dfs *DistributedFilesystem) GetStatus(timeout time.Duration) string
func (*DistributedFilesystem) GetVolume ¶
func (dfs *DistributedFilesystem) GetVolume(serviceID string) (volume.Volume, error)
func (*DistributedFilesystem) IsLocked ¶
func (dfs *DistributedFilesystem) IsLocked() (bool, error)
func (*DistributedFilesystem) ListBackups ¶
func (dfs *DistributedFilesystem) ListBackups(dirpath string) ([]dao.BackupFile, error)
ListBackups lists all the backups in a given directory
func (*DistributedFilesystem) ListSnapshots ¶
func (dfs *DistributedFilesystem) ListSnapshots(tenantID string) ([]dao.SnapshotInfo, error)
ListSnapshots lists all the snapshots for a particular tenant
func (*DistributedFilesystem) Lock ¶
func (dfs *DistributedFilesystem) Lock() error
func (*DistributedFilesystem) ResetRegistry ¶
func (dfs *DistributedFilesystem) ResetRegistry() error
ResetRegistry will update the host:port of the docker registry
func (*DistributedFilesystem) Restore ¶
func (dfs *DistributedFilesystem) Restore(filename string) error
func (*DistributedFilesystem) Rollback ¶
func (dfs *DistributedFilesystem) Rollback(snapshotID string, forceRestart bool) error
Rollback rolls back the dfs and docker images to the state of a given snapshot
func (*DistributedFilesystem) Snapshot ¶
func (dfs *DistributedFilesystem) Snapshot(tenantID string, description string) (string, error)
Snapshot takes a snapshot of the dfs as well as the docker images for the given service ID
func (*DistributedFilesystem) Unlock ¶
func (dfs *DistributedFilesystem) Unlock() error
type FileInfoSlice ¶
func (FileInfoSlice) Len ¶
func (p FileInfoSlice) Len() int
func (FileInfoSlice) Less ¶
func (p FileInfoSlice) Less(i, j int) bool
func (FileInfoSlice) Swap ¶
func (p FileInfoSlice) Swap(i, j int)
type ServiceVolumeGetter ¶
type SnapshotMetadata ¶
type SnapshotMetadata struct {
Description string
}