rsync

package
v0.0.0-...-1c5d739 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDeletingVolume    = errors.New("could not delete volume")
	ErrRsyncInvalidLabel = errors.New("invalid label")
	ErrRsyncDfCommand    = errors.New("error executing df command")
)

Functions

func Init

func Init(root string, _ []string) (volume.Driver, error)

Rsync driver intialization

Types

type RsyncDFStatus

type RsyncDFStatus struct {
	Filesystem     string
	TotalBytes     uint64
	UsedBytes      uint64
	AvailableBytes uint64
}

type RsyncDriver

type RsyncDriver struct {
	sync.Mutex
	// contains filtered or unexported fields
}

RsyncDriver is a driver for the rsync volume

func (*RsyncDriver) Cleanup

func (d *RsyncDriver) Cleanup() error

Cleanup implements volume.Driver.Cleanup

func (*RsyncDriver) Create

func (d *RsyncDriver) Create(volumeName string) (volume.Volume, error)

Create implements volume.Driver.Create

func (*RsyncDriver) DriverType

func (d *RsyncDriver) DriverType() volume.DriverType

DriverType implements volume.Driver.DriverType

func (*RsyncDriver) Exists

func (d *RsyncDriver) Exists(volumeName string) bool

Exists implements volume.Driver.Exists

func (*RsyncDriver) Get

func (d *RsyncDriver) Get(volumeName string) (volume.Volume, error)

Get implements volume.Driver.Get

func (*RsyncDriver) GetTenant

func (d *RsyncDriver) GetTenant(volumeName string) (volume.Volume, error)

GetTenant implements volume.Driver.GetTenant

func (*RsyncDriver) List

func (d *RsyncDriver) List() (result []string)

List implements volume.Driver.List

func (*RsyncDriver) MetadataDir

func (d *RsyncDriver) MetadataDir() string

MetadataDir returns the path to a volume's metadata directory

func (*RsyncDriver) Release

func (d *RsyncDriver) Release(volumeName string) error

Release implements volume.Driver.Release

func (*RsyncDriver) Remove

func (d *RsyncDriver) Remove(volumeName string) error

Remove implements volume.Driver.Remove

func (*RsyncDriver) Resize

func (d *RsyncDriver) Resize(volumeName string, size uint64) error

Resize implements volume.Driver.Resize. For rsync it's a noop.

func (*RsyncDriver) Root

func (d *RsyncDriver) Root() string

Root implements volume.Driver.Root

func (*RsyncDriver) Status

func (d *RsyncDriver) Status() (volume.Status, error)

Status implements volume.Driver.Status

type RsyncVolume

type RsyncVolume struct {
	sync.Mutex
	// contains filtered or unexported fields
}

RsyncVolume is an rsync volume

func (*RsyncVolume) Driver

func (v *RsyncVolume) Driver() volume.Driver

Driver implements volume.Volume.Driver

func (*RsyncVolume) Export

func (v *RsyncVolume) Export(label, parent string, writer io.Writer, excludes []string) error

Export implements volume.Volume.Export

func (*RsyncVolume) GetSnapshotWithTag

func (v *RsyncVolume) GetSnapshotWithTag(tagName string) (*volume.SnapshotInfo, error)

GetSnapshotWithTag implements volume.Volume.GetSnapshotWithTag

func (*RsyncVolume) Import

func (v *RsyncVolume) Import(label string, reader io.Reader) error

Import implements volume.Volume.Import

func (*RsyncVolume) Name

func (v *RsyncVolume) Name() string

Name implements volume.Volume.Name

func (*RsyncVolume) Path

func (v *RsyncVolume) Path() string

Path implements volume.Volume.Path

func (*RsyncVolume) ReadMetadata

func (v *RsyncVolume) ReadMetadata(label, name string) (io.ReadCloser, error)

ReadMetadata reads the metadata info from a snapshot.

func (*RsyncVolume) RemoveSnapshot

func (v *RsyncVolume) RemoveSnapshot(label string) error

RemoveSnapshot implements volume.Volume.RemoveSnapshot

func (*RsyncVolume) Rollback

func (v *RsyncVolume) Rollback(label string) (err error)

Rollback implements volume.Volume.Rollback

func (*RsyncVolume) Snapshot

func (v *RsyncVolume) Snapshot(label, message string, tags []string) (err error)

Snapshot implements volume.Volume.Snapshot

func (*RsyncVolume) SnapshotInfo

func (v *RsyncVolume) SnapshotInfo(label string) (*volume.SnapshotInfo, error)

SnapshotInfo returns the meta info for a snapshot

func (*RsyncVolume) Snapshots

func (v *RsyncVolume) Snapshots() ([]string, error)

Snapshots implements volume.Volume.Snapshots

func (*RsyncVolume) TagSnapshot

func (v *RsyncVolume) TagSnapshot(label, tagName string) error

TagSnapshot implements volume.Volume.TagSnapshot

func (*RsyncVolume) Tenant

func (v *RsyncVolume) Tenant() string

Tenant implements volume.Volume.Tenant

func (*RsyncVolume) UntagSnapshot

func (v *RsyncVolume) UntagSnapshot(tagName string) (string, error)

UntagSnapshot implements volume.Volume.UntagSnapshot

func (*RsyncVolume) WriteMetadata

func (v *RsyncVolume) WriteMetadata(label, name string) (io.WriteCloser, error)

WriteMetadata writes the metadata info for a snapshot on the base volume.

Jump to

Keyboard shortcuts

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