client

package
v0.0.0-...-c07804e Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the zfs backup client for a single S3 bucket.

func New

func New(opts Options) (*Client, error)

New creates a new client for this bucket. Constructs filesystem clients for all filesystems defined.

func (*Client) BackupWriteFull

func (c *Client) BackupWriteFull(ctx context.Context, key string, size uint64, rc zfs.ZFSReader) error

BackupWriteFull writes a full backup to the bucket for every filesystem.

func (*Client) ListDBs

func (c *Client) ListDBs(ctx context.Context) ([]backup.DB, error)

ListDBs lists the databases in the bucket for each filesystem.

type Options

type Options struct {
	// Log is the logger for the Client.
	Log logr.Logger

	// Filesystems are the ZFS filesystems to backup.
	Filesystems []string

	// Cadence is the cadence of backups to be kept over time.
	Cadence config.Cadence

	// Bucket contains the configuration for the S3 bucket.
	Bucket config.Bucket

	// IO references files to write to the terminal.
	IO util.IO

	// Force instructs the client to overwrite the existing cadence if it differs
	// from the local config. Dangerous, and should only be done when the user
	// knows what they are doing.
	Force bool
}

Options defines the options for creating Clients.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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