snapshot_agent

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBackup

func RunBackup(snapshotter *Snapshotter, c *appconfig.Configuration) (string, error)

Types

type AzureBy

type AzureBy func(f1, f2 *azblob.BlobItemInternal) bool

implementation of Sort interface for s3 objects

func (AzureBy) Sort

func (by AzureBy) Sort(objects []azblob.BlobItemInternal)

type By

type By func(f1, f2 *fs.DirEntry) bool

implementation of Sort interface for fileInfo

func (By) Sort

func (by By) Sort(files []fs.DirEntry)

type GCPBy

type GCPBy func(f1, f2 *storage.ObjectAttrs) bool

implementation of Sort interface for s3 objects

func (GCPBy) Sort

func (by GCPBy) Sort(objects []storage.ObjectAttrs)

type S3By

type S3By func(f1, f2 *s3.Object) bool

implementation of Sort interface for s3 objects

func (S3By) Sort

func (by S3By) Sort(objects []s3.Object)

type Snapshotter

type Snapshotter struct {
	API             *vaultApi.Client
	Uploader        *s3manager.Uploader
	S3Client        *s3.S3
	GCPBucket       *storage.BucketHandle
	AzureUploader   azblob.ContainerURL
	TokenExpiration time.Time
}

func NewSnapshotter

func NewSnapshotter(config *config.Configuration) (*Snapshotter, error)

func (*Snapshotter) ConfigureAzure

func (s *Snapshotter) ConfigureAzure(config *config.Configuration) error

func (*Snapshotter) ConfigureGCP

func (s *Snapshotter) ConfigureGCP(config *config.Configuration) error

func (*Snapshotter) ConfigureS3

func (s *Snapshotter) ConfigureS3(config *config.Configuration) error

func (*Snapshotter) ConfigureVaultClient

func (s *Snapshotter) ConfigureVaultClient(config *config.Configuration) error

func (*Snapshotter) CreateAzureSnapshot

func (s *Snapshotter) CreateAzureSnapshot(reader io.ReadWriter, config *appconfig.Configuration, currentTs int64) (string, error)

CreateAzureSnapshot writes snapshot to azure blob storage

func (*Snapshotter) CreateGCPSnapshot

func (s *Snapshotter) CreateGCPSnapshot(b *bytes.Buffer, config *appconfig.Configuration, currentTs int64) (string, error)

CreateGCPSnapshot writes snapshot to google storage

func (*Snapshotter) CreateLocalSnapshot

func (s *Snapshotter) CreateLocalSnapshot(buf *bytes.Buffer, config *appconfig.Configuration, currentTs int64) (string, error)

CreateLocalSnapshot writes snapshot to disk location

func (*Snapshotter) CreateS3Snapshot

func (s *Snapshotter) CreateS3Snapshot(reader io.ReadWriter, config *config.Configuration, currentTs int64) (string, error)

CreateS3Snapshot writes snapshot to s3 location

func (*Snapshotter) SetClientTokenFromAppRole

func (s *Snapshotter) SetClientTokenFromAppRole(config *config.Configuration) error

func (*Snapshotter) SetClientTokenFromK8sAuth

func (s *Snapshotter) SetClientTokenFromK8sAuth(config *config.Configuration) error

Jump to

Keyboard shortcuts

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