Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // Save saves the backup from the given reader with given etcd version and revision. // It returns the size of the snapshot saved. Save(etcdVersion string, rev int64, r io.Reader) (size int64, err error) // GetLatest gets latest backup's name. // If no backup is available, returns empty string name. GetLatest() (name string, err error) // Open opens a backup file for reading Open(name string) (rc io.ReadCloser, err error) // Total returns the total number of available backups. Total() (int, error) // TotalSize returns the total size of the backups. TotalSize() (int64, error) // Purge purges backup files when backups are greater than maxBackupFiles. Purge(maxBackupFiles int) error }
Backend defines required backend operations
func NewAbsBackend ¶
func NewFileBackend ¶
Click to show internal directories.
Click to hide internal directories.