Documentation
¶
Index ¶
- Variables
- func SetLogger(logger *zap.Logger)
- type BackupIndex
- type ChunkDef
- type DStoreStorage
- func (s *DStoreStorage) ChunkExists(hash string) (bool, error)
- func (s *DStoreStorage) ListBackups(limit int, prefix string) (out []string, err error)
- func (s *DStoreStorage) OpenBackupIndex(name string) (out io.ReadCloser, err error)
- func (s *DStoreStorage) OpenChunk(hash string) (out io.ReadCloser, err error)
- func (s *DStoreStorage) SetTimeout(timeout time.Duration)
- func (s *DStoreStorage) WriteBackupIndex(name string, content []byte) (err error)
- func (s *DStoreStorage) WriteChunk(hash string, content []byte) (err error)
- type FileIndex
- type FileOps
- type Filter
- type FilterFunc
- type GZipReadCloser
- type IncludeThanExcludeFilter
- type ListableBackup
- type PITR
- func (p *PITR) GenerateBackup(source string, tag string, metadata map[string]interface{}, filter Filter) error
- func (p *PITR) GetLatestBackup(tag string) (string, error)
- func (p *PITR) ListBackupFiles(backupName string, filter Filter) error
- func (p *PITR) ListBackups(limit, offset int, prefix string, withMeta bool) (out []*ListableBackup, err error)
- func (p *PITR) RestoreFromBackup(dest string, backupName string, filter Filter) error
- func (p *PITR) SetCacheStorage(storage Storage)
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var AllFileFilter = FilterFunc(func(relativePath string) bool { return true })
Functions ¶
Types ¶
type BackupIndex ¶
type BackupIndex struct {
Version string `json:"version"`
Date time.Time `json:"date"`
Tag string `json:"tag"`
Meta map[string]interface{} `json:"meta"`
Files []*FileIndex `json:"files"`
ChunkSize int64 `json:"chunk_size"`
}
func (*BackupIndex) ComputeFileEstimatedDiskSize ¶
func (backup *BackupIndex) ComputeFileEstimatedDiskSize(filename string) (uint64, error)
func (*BackupIndex) FindFilesMatching ¶
func (backupIndex *BackupIndex) FindFilesMatching(filter Filter) ([]*FileIndex, error)
type DStoreStorage ¶
type DStoreStorage struct {
// contains filtered or unexported fields
}
func NewDStoreStorage ¶
func NewDStoreStorage(ctx context.Context, baseURL string) (*DStoreStorage, error)
func (*DStoreStorage) ChunkExists ¶
func (s *DStoreStorage) ChunkExists(hash string) (bool, error)
func (*DStoreStorage) ListBackups ¶
func (s *DStoreStorage) ListBackups(limit int, prefix string) (out []string, err error)
func (*DStoreStorage) OpenBackupIndex ¶
func (s *DStoreStorage) OpenBackupIndex(name string) (out io.ReadCloser, err error)
func (*DStoreStorage) OpenChunk ¶
func (s *DStoreStorage) OpenChunk(hash string) (out io.ReadCloser, err error)
func (*DStoreStorage) SetTimeout ¶
func (s *DStoreStorage) SetTimeout(timeout time.Duration)
func (*DStoreStorage) WriteBackupIndex ¶
func (s *DStoreStorage) WriteBackupIndex(name string, content []byte) (err error)
func (*DStoreStorage) WriteChunk ¶
func (s *DStoreStorage) WriteChunk(hash string, content []byte) (err error)
type FilterFunc ¶
func (FilterFunc) Match ¶
func (f FilterFunc) Match(relativePath string) bool
type GZipReadCloser ¶
func NewGZipReadCloser ¶
func NewGZipReadCloser(src io.ReadCloser) (*GZipReadCloser, error)
func (*GZipReadCloser) Close ¶
func (g *GZipReadCloser) Close() error
type IncludeThanExcludeFilter ¶
type IncludeThanExcludeFilter struct {
// contains filtered or unexported fields
}
func MustNewIncludeThanExcludeFilter ¶
func MustNewIncludeThanExcludeFilter(includeFilter, excludeFilter string) *IncludeThanExcludeFilter
func NewIncludeThanExcludeFilter ¶
func NewIncludeThanExcludeFilter(includeFilter, excludeFilter string) (*IncludeThanExcludeFilter, error)
func (*IncludeThanExcludeFilter) Match ¶
func (f *IncludeThanExcludeFilter) Match(relativePath string) bool
type ListableBackup ¶
type PITR ¶
type PITR struct {
AppendonlyFiles []string
// contains filtered or unexported fields
}
func NewDefaultPITR ¶
func (*PITR) GenerateBackup ¶
func (*PITR) ListBackupFiles ¶
func (*PITR) ListBackups ¶
func (*PITR) RestoreFromBackup ¶
func (*PITR) SetCacheStorage ¶
SetCachingStorage enables caching through the provided Storage object.
type Storage ¶
type Storage interface {
ListBackups(limit int, prefix string) ([]string, error)
OpenBackupIndex(name string) (io.ReadCloser, error)
WriteBackupIndex(name string, content []byte) error
OpenChunk(hash string) (io.ReadCloser, error)
WriteChunk(hash string, content []byte) error
ChunkExists(hash string) (bool, error)
SetTimeout(timeout time.Duration)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.