syncmanager

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: LGPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package syncmanager provides a manager for syncing btrfs snapshots with a local or remote host.

Index

Constants

This section is empty.

Variables

View Source
var OffsetDirectory = ".btrsync"

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger              *log.Logger
	Verbosity           int
	SubvolumeIdentifier string
	FullSubvolumePath   string
	SnapshotDirectory   string
	SnapshotName        string
	MirrorPath          string
	MirrorFormat        config.MirrorFormat
	SSHUser             string
	SSHPassword         string
	SSHKeyFile          string
	SSHHostKey          string
}

func (*Config) LogVerbose

func (c *Config) LogVerbose(level int, format string, args ...interface{})

func (*Config) MirrorURL

func (c *Config) MirrorURL() (*url.URL, error)

func (*Config) SSHConfig

func (c *Config) SSHConfig() (*ssh.ClientConfig, error)

type Manager

type Manager interface {
	Sync(ctx context.Context) error
	Prune(ctx context.Context) error
	Close() error
}

func New

func New(cfg *Config) (Manager, error)

func NewLocalCompressedManager

func NewLocalCompressedManager(cfg *Config, subvolInfo *btrfs.RootInfo) (Manager, error)

func NewLocalDirectoryManager

func NewLocalDirectoryManager(cfg *Config, subvolInfo *btrfs.RootInfo) (Manager, error)

func NewLocalSubvolumeManager

func NewLocalSubvolumeManager(cfg *Config, subvolInfo *btrfs.RootInfo) (Manager, error)

func NewSSHCompressedManager

func NewSSHCompressedManager(cfg *Config, subvolInfo *btrfs.RootInfo) (Manager, error)

func NewSSHDirectoryManager

func NewSSHDirectoryManager(cfg *Config, subvolInfo *btrfs.RootInfo) (Manager, error)

func NewSSHSubvolumeManager

func NewSSHSubvolumeManager(cfg *Config, subvolInfo *btrfs.RootInfo) (Manager, error)

Jump to

Keyboard shortcuts

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