dryrun

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend passes reads through to an underlying layer and accepts writes, but doesn't do anything. Also removes are ignored. So in fact, this backend silently ignores all operations that would modify the repo and does normal operations else. This is used for `backup --dry-run`.

func New

func New(be backend.Backend) *Backend

func (*Backend) Close

func (be *Backend) Close() error

func (*Backend) Delete

func (be *Backend) Delete(_ context.Context) error

Delete removes all data in the backend.

func (*Backend) Hasher

func (be *Backend) Hasher() hash.Hash

func (*Backend) IsNotExist

func (be *Backend) IsNotExist(err error) bool

func (*Backend) IsPermanentError added in v0.17.0

func (be *Backend) IsPermanentError(err error) bool

func (*Backend) List

func (be *Backend) List(ctx context.Context, t backend.FileType, fn func(backend.FileInfo) error) error

func (*Backend) Load

func (be *Backend) Load(ctx context.Context, h backend.Handle, length int, offset int64, fn func(io.Reader) error) error

func (*Backend) Properties added in v0.18.0

func (be *Backend) Properties() backend.Properties

func (*Backend) Remove

func (be *Backend) Remove(_ context.Context, _ backend.Handle) error

Remove deletes a file from the backend.

func (*Backend) Save

Save adds new Data to the backend.

func (*Backend) Stat

func (be *Backend) Stat(ctx context.Context, h backend.Handle) (backend.FileInfo, error)

func (*Backend) Warmup added in v0.18.0

func (be *Backend) Warmup(_ context.Context, _ []backend.Handle) ([]backend.Handle, error)

Warmup should not occur during dry-runs.

func (*Backend) WarmupWait added in v0.18.0

func (be *Backend) WarmupWait(_ context.Context, _ []backend.Handle) error

Jump to

Keyboard shortcuts

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