Documentation
¶
Index ¶
- Variables
- type Azure
- func (a *Azure) DeleteObject(ctx context.Context, objectName string) error
- func (a *Azure) GetObject(ctx context.Context, name string) (io.ReadCloser, error)
- func (a *Azure) GetPrefix() string
- func (a *Azure) ListObjects(ctx context.Context, prefix string) ([]string, error)
- func (a *Azure) PutObject(ctx context.Context, name string, data io.Reader, _ int64) error
- func (a *Azure) SetPrefix(prefix string)
- type AzureOptions
- type NewClientFunc
- type Options
- func GetOptions(ctx context.Context, cl client.Client, cluster *api.PerconaXtraDBCluster, ...) (Options, error)
- func GetOptionsFromBackup(ctx context.Context, cl client.Client, cluster *api.PerconaXtraDBCluster, ...) (Options, error)
- func GetOptionsFromBackupConfig(cfg *xbscapi.BackupConfig) (Options, error)
- type S3
- func (s *S3) DeleteObject(ctx context.Context, objectName string) error
- func (s *S3) GetObject(ctx context.Context, objectName string) (io.ReadCloser, error)
- func (s *S3) GetPrefix() string
- func (s *S3) ListObjects(ctx context.Context, prefix string) ([]string, error)
- func (s *S3) PutObject(ctx context.Context, name string, data io.Reader, size int64) error
- func (s *S3) SetPrefix(prefix string)
- type S3Options
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrObjectNotFound = errors.New("object not found")
Functions ¶
This section is empty.
Types ¶
type Azure ¶
type Azure struct {
// contains filtered or unexported fields
}
Azure is a type for working with Azure Blob storages
func (*Azure) DeleteObject ¶
func (*Azure) ListObjects ¶
type AzureOptions ¶
type AzureOptions struct {
StorageAccount string
AccessKey string
Endpoint string
Container string
Prefix string
BlockSize int64
Concurrency int
}
func (*AzureOptions) Type ¶
func (o *AzureOptions) Type() api.BackupStorageType
type Options ¶
type Options interface {
Type() api.BackupStorageType
}
func GetOptions ¶ added in v1.17.0
func GetOptionsFromBackup ¶
func GetOptionsFromBackup(ctx context.Context, cl client.Client, cluster *api.PerconaXtraDBCluster, backup *api.PerconaXtraDBClusterBackup) (Options, error)
func GetOptionsFromBackupConfig ¶ added in v1.19.0
func GetOptionsFromBackupConfig(cfg *xbscapi.BackupConfig) (Options, error)
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
S3 is a type for working with S3 storages
func (*S3) ListObjects ¶
type S3Options ¶
type S3Options struct {
Endpoint string
AccessKeyID string
SecretAccessKey string
SessionToken string
BucketName string
Prefix string
Region string
VerifyTLS bool
CABundle []byte
ForcePathStyle bool
ChecksumAlgorithm api.S3ChecksumAlgorithmType
SkipBucketExistsCheck bool
}
func (*S3Options) Type ¶
func (o *S3Options) Type() api.BackupStorageType
type Storage ¶
type Storage interface {
GetObject(ctx context.Context, objectName string) (io.ReadCloser, error)
PutObject(ctx context.Context, name string, data io.Reader, size int64) error
ListObjects(ctx context.Context, prefix string) ([]string, error)
DeleteObject(ctx context.Context, objectName string) error
SetPrefix(prefix string)
GetPrefix() string
}
Click to show internal directories.
Click to hide internal directories.