Documentation ¶
Overview ¶
Package chbackup describes the objects and functions for clickhouse-backup app
Index ¶
- Constants
- Variables
- type AzureBlob
- func (s *AzureBlob) Connect() error
- func (s *AzureBlob) DeleteFile(key string) error
- func (s *AzureBlob) GetFile(key string) (RemoteFile, error)
- func (s *AzureBlob) GetFileReader(key string) (io.ReadCloser, error)
- func (s *AzureBlob) Kind() string
- func (s *AzureBlob) PutFile(key string, r io.ReadCloser) error
- func (s *AzureBlob) Walk(_ string, process func(r RemoteFile)) error
- type Backup
- type BackupDestination
- func (bd *BackupDestination) BackupList() ([]Backup, error)
- func (bd *BackupDestination) BackupsToKeep() int
- func (bd *BackupDestination) CompressedStreamDownload(remotePath string, localPath string) error
- func (bd *BackupDestination) CompressedStreamUpload(localPath, remotePath, diffFromPath string) error
- func (bd *BackupDestination) RemoveBackup(backupName string) error
- func (bd *BackupDestination) RemoveOldBackups(keep int) error
- type COS
- func (c *COS) Connect() error
- func (c *COS) DeleteFile(key string) error
- func (c *COS) GetFile(key string) (RemoteFile, error)
- func (c *COS) GetFileReader(key string) (io.ReadCloser, error)
- func (c *COS) Kind() string
- func (c *COS) PutFile(key string, r io.ReadCloser) error
- func (c *COS) Walk(path string, process func(RemoteFile)) error
- type FTP
- func (f *FTP) Connect() error
- func (f *FTP) DeleteFile(key string) error
- func (f *FTP) GetFile(key string) (RemoteFile, error)
- func (f *FTP) GetFileReader(key string) (io.ReadCloser, error)
- func (f *FTP) Kind() string
- func (f *FTP) PutFile(key string, r io.ReadCloser) error
- func (f *FTP) Walk(root string, process func(RemoteFile)) error
- type GCS
- func (gcs *GCS) Connect() error
- func (gcs *GCS) DeleteFile(key string) error
- func (gcs *GCS) GetFile(key string) (RemoteFile, error)
- func (gcs *GCS) GetFileReader(key string) (io.ReadCloser, error)
- func (gcs *GCS) GetFileWriter(key string) io.WriteCloser
- func (gcs *GCS) Kind() string
- func (gcs *GCS) PutFile(key string, r io.ReadCloser) error
- func (gcs *GCS) Walk(gcsPath string, process func(r RemoteFile)) error
- type MetaFile
- type RemoteFile
- type RemoteStorage
- type S3
- func (s *S3) Connect() error
- func (s *S3) DeleteFile(key string) error
- func (s *S3) GetFile(key string) (RemoteFile, error)
- func (s *S3) GetFileReader(key string) (io.ReadCloser, error)
- func (s *S3) Kind() string
- func (s *S3) PutFile(key string, r io.ReadCloser) error
- func (s *S3) Walk(s3Path string, process func(r RemoteFile)) error
Constants ¶
View Source
const ( // MetaFileName - meta file name MetaFileName = "meta.json" // BufferSize - size of ring buffer between stream handlers BufferSize = 4 * 1024 * 1024 )
Variables ¶
View Source
var ( // ErrNotFound is returned when file/object cannot be found ErrNotFound = errors.New("file not found") )
Functions ¶
This section is empty.
Types ¶
type AzureBlob ¶
type AzureBlob struct { Container azblob.ContainerURL CPK azblob.ClientProvidedKeyOptions Config *config.AzureBlobConfig }
AzureBlob - presents methods for manipulate data on Azure
func (*AzureBlob) DeleteFile ¶
func (*AzureBlob) GetFileReader ¶
func (s *AzureBlob) GetFileReader(key string) (io.ReadCloser, error)
type Backup ¶
func GetBackupsToDelete ¶
type BackupDestination ¶
type BackupDestination struct { RemoteStorage // contains filtered or unexported fields }
func NewBackupDestination ¶
func NewBackupDestination(cfg *config.Config) (*BackupDestination, error)
func (*BackupDestination) BackupList ¶
func (bd *BackupDestination) BackupList() ([]Backup, error)
func (*BackupDestination) BackupsToKeep ¶
func (bd *BackupDestination) BackupsToKeep() int
func (*BackupDestination) CompressedStreamDownload ¶
func (bd *BackupDestination) CompressedStreamDownload(remotePath string, localPath string) error
func (*BackupDestination) CompressedStreamUpload ¶
func (bd *BackupDestination) CompressedStreamUpload(localPath, remotePath, diffFromPath string) error
func (*BackupDestination) RemoveBackup ¶
func (bd *BackupDestination) RemoveBackup(backupName string) error
func (*BackupDestination) RemoveOldBackups ¶
func (bd *BackupDestination) RemoveOldBackups(keep int) error
type COS ¶
func (*COS) DeleteFile ¶
func (*COS) GetFileReader ¶
func (c *COS) GetFileReader(key string) (io.ReadCloser, error)
type FTP ¶
func (*FTP) DeleteFile ¶
func (*FTP) GetFileReader ¶
func (f *FTP) GetFileReader(key string) (io.ReadCloser, error)
type GCS ¶
GCS - presents methods for manipulate data on GCS
func (*GCS) DeleteFile ¶
func (*GCS) GetFileReader ¶
func (gcs *GCS) GetFileReader(key string) (io.ReadCloser, error)
func (*GCS) GetFileWriter ¶
func (gcs *GCS) GetFileWriter(key string) io.WriteCloser
type MetaFile ¶
type MetaFile struct { RequiredBackup string `json:"required_backup"` Hardlinks []string `json:"hardlinks"` }
MetaFile - structure describe meta file that will be added to incremental backups archive. Contains info of required files in backup and files
type RemoteFile ¶
RemoteFile - interface describe file on remote storage
type RemoteStorage ¶
type RemoteStorage interface { Kind() string GetFile(string) (RemoteFile, error) DeleteFile(string) error Connect() error Walk(string, func(RemoteFile)) error GetFileReader(key string) (io.ReadCloser, error) PutFile(key string, r io.ReadCloser) error }
RemoteStorage -
type S3 ¶
S3 - presents methods for manipulate data on s3
func (*S3) DeleteFile ¶
func (*S3) GetFileReader ¶
func (s *S3) GetFileReader(key string) (io.ReadCloser, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
forked from github.com/Azure/azure-storage-blob-go/azblob/blob/feature/clientprovidedkey because UploadStreamToBlockBlob does not expose CPK forked from github.com/Azure/azure-storage-blob-go/azblob/blob/feature/clientprovidedkey because UploadStreamToBlockBlob does not expose CPK
|
forked from github.com/Azure/azure-storage-blob-go/azblob/blob/feature/clientprovidedkey because UploadStreamToBlockBlob does not expose CPK forked from github.com/Azure/azure-storage-blob-go/azblob/blob/feature/clientprovidedkey because UploadStreamToBlockBlob does not expose CPK |
Click to show internal directories.
Click to hide internal directories.