driver

package
v1.0.0-next.3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const SnapPrefix = "backup_blob_"

Variables

View Source
var DefaultBlockSize = 1024 * 1024 * 4

Functions

func NewConfigDriver

func NewConfigDriver(params *config.LoadParams) (config.ConfigDriver, error)

func NewCrypt

func NewCrypt(conf *config.CryptConfig) domain.Middleware

func NewDefaultNamer

func NewDefaultNamer(nower domain.Nower) domain.SnapshotNamestrategy

func NewLog

func NewLog(writer io.Writer, logLevel domain.LogLevel) domain.LogDriver

func NewRender

func NewRender() domain.RenderDriver

func NewS3Storage

func NewS3Storage(client *s3.Client, logger domain.LogDriver) domain.StorageDriver

func NewS3StorageFromConfig

func NewS3StorageFromConfig(s3c *config2.S3Config, logger domain.LogDriver) (domain.StorageDriver, error)

func NewThrottle

func NewThrottle(conf *config.ThrottleConfig) domain.Middleware

func NewZfs

func NewZfs(binaryPath string, cmd domain.Commander, logger domain.LogDriver) domain.ZfsDriver

func NewZfsFromConfig

func NewZfsFromConfig(conf *config.ZfsConfig, logger domain.LogDriver) domain.ZfsDriver

Types

type ConfigDriver

type ConfigDriver struct {
	// contains filtered or unexported fields
}

func (*ConfigDriver) GetConfig

func (c *ConfigDriver) GetConfig() *config.Config

func (*ConfigDriver) GetMiddlewares

func (c *ConfigDriver) GetMiddlewares() []domain.Middleware

func (*ConfigDriver) GetStorageDriver

func (c *ConfigDriver) GetStorageDriver() domain.StorageDriver

func (*ConfigDriver) GetZfsDriver

func (c *ConfigDriver) GetZfsDriver() domain.ZfsDriver

func (*ConfigDriver) Load

func (c *ConfigDriver) Load(params *config.LoadParams) error

type CryptDriver

type CryptDriver struct {
	Conf    *config.CryptConfig
	Crypter crypt.EncryptDecrypter
}

func (*CryptDriver) Read

func (cd *CryptDriver) Read(r io.Reader) (rp io.Reader, err error)

func (*CryptDriver) Write

func (cd *CryptDriver) Write(w io.Writer) (wp io.Writer, err error)

type FakeReader

type FakeReader struct {
	// contains filtered or unexported fields
}

func (*FakeReader) Read

func (r *FakeReader) Read(p []byte) (n int, err error)

type FakeWriterAt

type FakeWriterAt struct {
	// contains filtered or unexported fields
}

func (*FakeWriterAt) WriteAt

func (fw *FakeWriterAt) WriteAt(p []byte, offset int64) (n int, err error)

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph() *Graph

Function to initialize a new graph.

func (*Graph) AddEdge

func (g *Graph) AddEdge(from, to string)

Function to add a directed edge between two vertices.

func (*Graph) AddVertex

func (g *Graph) AddVertex(vertex string)

Function to add a vertex to the graph.

func (*Graph) DFS

func (g *Graph) DFS(startVertex string) []string

type S3Storage

type S3Storage struct {
	Client *s3.Client
	Logger domain.LogDriver
	Bucket *string
	Prefix string
	// contains filtered or unexported fields
}

func (*S3Storage) Delete

func (s *S3Storage) Delete(ctx context.Context, dp *domain.DeleteParameters) error

func (*S3Storage) Download

func (s *S3Storage) Download(ctx context.Context, dp *domain.DownloadParameters, writer io.Writer) error

func (*S3Storage) Upload

type Throttle

type Throttle struct {
	Conf *config.ThrottleConfig
}

func (*Throttle) Read

func (t *Throttle) Read(r io.Reader) (rp io.Reader, err error)

func (*Throttle) Write

func (t *Throttle) Write(w io.Writer) (wp io.Writer, err error)

Jump to

Keyboard shortcuts

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