snapshot

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileProviderType   = "file://"
	S3ProviderType     = "s3://"
	SpacesProviderType = "digitaloceanspaces"
)

Variables

This section is empty.

Functions

func ParseSnapshotBackupURL

func ParseSnapshotBackupURL(url string) (string, string)

ParseSnapshotBackupURL deconstructs a uri into a type prefix and a bucket example inputs and outputs:

file://file                                -> file://, file
s3://bucket                                -> s3://, bucket
https://nyc3.digitaloceanspaces.com/bucket -> digitaloceanspaces, bucket

Types

type AWSSnapshotter

type AWSSnapshotter struct {
	// contains filtered or unexported fields
}

func NewAWSSnapshotter

func NewAWSSnapshotter(cfg *aws.Config) (*AWSSnapshotter, error)

func (*AWSSnapshotter) Load

func (s *AWSSnapshotter) Load() (io.ReadCloser, error)

func (*AWSSnapshotter) Save

func (s *AWSSnapshotter) Save(r io.ReadCloser) error

type DigitalOceanSnapshotter

type DigitalOceanSnapshotter struct {
	// contains filtered or unexported fields
}

func NewDigitalOceanSnapshotter

func NewDigitalOceanSnapshotter(cfg *digitalocean.Config) (*DigitalOceanSnapshotter, error)

func (*DigitalOceanSnapshotter) Load

func (*DigitalOceanSnapshotter) Save

type FileSnapshotter

type FileSnapshotter struct {
	// contains filtered or unexported fields
}

func NewFileSnapshotter

func NewFileSnapshotter(path string) (*FileSnapshotter, error)

func (*FileSnapshotter) Load

func (fs *FileSnapshotter) Load() (io.ReadCloser, error)

func (*FileSnapshotter) Save

func (fs *FileSnapshotter) Save(r io.ReadCloser) error

type SnapshotProvider

type SnapshotProvider interface {
	Load() (io.ReadCloser, error)
	Save(io.ReadCloser) error
}

Jump to

Keyboard shortcuts

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