snapshot

package
v0.4.22-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: ISC Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadata

func GetMetadata(repo *repository.Repository, checksum [32]byte) (*metadata.Metadata, [32]byte, error)

func GetSnapshot

func GetSnapshot(repo *repository.Repository, snapshotID [32]byte) (*header.Header, bool, error)

Types

type CheckOptions

type CheckOptions struct {
	MaxConcurrency uint64
	FastCheck      bool
}

type NoOpLogger

type NoOpLogger struct{}

func (*NoOpLogger) Debugf

func (l *NoOpLogger) Debugf(format string, v ...interface{})

func (*NoOpLogger) Errorf

func (l *NoOpLogger) Errorf(format string, v ...interface{})

func (*NoOpLogger) Fatalf

func (l *NoOpLogger) Fatalf(format string, v ...interface{})

func (*NoOpLogger) Infof

func (l *NoOpLogger) Infof(format string, v ...interface{})

func (*NoOpLogger) Warningf

func (l *NoOpLogger) Warningf(format string, v ...interface{})

type PackerMsg

type PackerMsg struct {
	Timestamp time.Time
	Type      uint8
	Checksum  [32]byte
	Data      []byte
}

type PushOptions

type PushOptions struct {
	MaxConcurrency uint64
	Excludes       []glob.Glob
}

type Reader

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

func NewReader

func NewReader(snap *Snapshot, pathname string) (*Reader, error)

func (*Reader) Close

func (reader *Reader) Close() error

func (*Reader) GetContentType

func (reader *Reader) GetContentType() string

func (*Reader) Read

func (reader *Reader) Read(buf []byte) (int, error)

func (*Reader) Seek

func (reader *Reader) Seek(offset int64, whence int) (int64, error)

type RestoreOptions

type RestoreOptions struct {
	MaxConcurrency uint64
	Rebase         bool
}

type Snapshot

type Snapshot struct {
	SkipDirs []string

	Header *header.Header

	Metadata *metadata.Metadata
	// contains filtered or unexported fields
}

func Fork

func Fork(repo *repository.Repository, snapshotID [32]byte) (*Snapshot, error)

func Load

func Load(repo *repository.Repository, snapshotID [32]byte) (*Snapshot, error)

func New

func New(repo *repository.Repository, snapshotID [32]byte) (*Snapshot, error)

func (*Snapshot) Backup

func (snap *Snapshot) Backup(scanDir string, options *PushOptions) error

func (*Snapshot) CheckChunk

func (snapshot *Snapshot) CheckChunk(checksum [32]byte) bool

func (*Snapshot) CheckDirectory

func (snapshot *Snapshot) CheckDirectory(checksum [32]byte) bool

func (*Snapshot) CheckFile

func (snapshot *Snapshot) CheckFile(checksum [32]byte) bool

func (*Snapshot) CheckObject

func (snapshot *Snapshot) CheckObject(checksum [32]byte) bool

func (*Snapshot) Commit

func (snapshot *Snapshot) Commit() error

func (*Snapshot) Event

func (snap *Snapshot) Event(evt events.Event)

func (*Snapshot) Filesystem

func (s *Snapshot) Filesystem() (*vfs.Filesystem, error)

func (*Snapshot) GetChunk

func (snapshot *Snapshot) GetChunk(checksum [32]byte) ([]byte, error)

func (*Snapshot) GetData

func (snapshot *Snapshot) GetData(checksum [32]byte) ([]byte, error)

func (*Snapshot) GetDirectory

func (snapshot *Snapshot) GetDirectory(checksum [32]byte) ([]byte, error)

func (*Snapshot) GetFile

func (snapshot *Snapshot) GetFile(checksum [32]byte) ([]byte, error)

func (*Snapshot) GetObject

func (snapshot *Snapshot) GetObject(checksum [32]byte) ([]byte, error)

func (*Snapshot) ListChunks

func (snap *Snapshot) ListChunks() (<-chan [32]byte, error)

func (*Snapshot) ListDatas

func (snap *Snapshot) ListDatas() (<-chan [32]byte, error)

func (*Snapshot) ListDirectories

func (snap *Snapshot) ListDirectories() (<-chan [32]byte, error)

func (*Snapshot) ListFiles

func (snap *Snapshot) ListFiles() (<-chan [32]byte, error)

func (*Snapshot) ListObjects

func (snap *Snapshot) ListObjects() (<-chan [32]byte, error)

func (*Snapshot) LookupObject

func (snapshot *Snapshot) LookupObject(checksum [32]byte) (*objects.Object, error)

func (*Snapshot) NewReader

func (snapshot *Snapshot) NewReader(pathname string) (*Reader, error)

func (*Snapshot) PutChunk

func (snap *Snapshot) PutChunk(checksum [32]byte, data []byte) error

func (*Snapshot) PutData

func (snap *Snapshot) PutData(checksum [32]byte, data []byte) error

func (*Snapshot) PutDirectory

func (snap *Snapshot) PutDirectory(checksum [32]byte, data []byte) error

func (*Snapshot) PutFile

func (snap *Snapshot) PutFile(checksum [32]byte, data []byte) error

func (*Snapshot) PutHeader

func (snap *Snapshot) PutHeader(checksum [32]byte, data []byte) error

func (*Snapshot) PutObject

func (snap *Snapshot) PutObject(checksum [32]byte, data []byte) error

func (*Snapshot) PutPackfile

func (snap *Snapshot) PutPackfile(pack *packfile.PackFile, objects [][32]byte, chunks [][32]byte, files [][32]byte, directories [][32]byte, datas [][32]byte, snapshots [][32]byte) error

func (*Snapshot) Repository

func (snapshot *Snapshot) Repository() *repository.Repository

func (*Snapshot) Restore

func (snap *Snapshot) Restore(exp *exporter.Exporter, pattern string, opts *RestoreOptions) error

func (*Snapshot) Verify

func (snap *Snapshot) Verify(pathname string, opts *CheckOptions) (bool, error)

Directories

Path Synopsis
fs
s3
fs
ftp
s3

Jump to

Keyboard shortcuts

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