statcache

package
v1.63.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package statcache is the per-machine sidecar that remembers what each file looked like when it was last read, so a run can detect changes that mtime and size alone miss and can be dropped at any time without losing correctness.

Index

Constants

This section is empty.

Variables

View Source
var ErrLocked = errors.New("another process has the cache open")

ErrLocked is returned by Open when another process has the cache open.

Functions

This section is empty.

Types

type Cache

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

Cache is a badger-backed backup.StatCache.

func Open

func Open(dir string) (*Cache, error)

Open opens or creates the cache in dir. It fails with ErrLocked while another process has it open.

func (*Cache) Close

func (c *Cache) Close() error

Close closes the database.

func (*Cache) Lookup

func (c *Cache) Lookup(path string, info os.FileInfo) (present bool, matched bool)

Lookup implements backup.StatCache.

func (*Cache) Store

func (c *Cache) Store(path string, info os.FileInfo, ref *proto.Ref) error

Store implements backup.StatCache.

Jump to

Keyboard shortcuts

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