Documentation
¶
Overview ¶
Package storage defines the persistent storage of snapshots.
Index ¶
- type LocalFiles
- func (s *LocalFiles) CachePathInfo(ctx context.Context, p snapshot.Path, info os.FileInfo) error
- func (s *LocalFiles) Exclude(p snapshot.Path) bool
- func (s *LocalFiles) FindSnapshot(ctx context.Context, p snapshot.Path) (*snapshot.Hash, *snapshot.File, error)
- func (s *LocalFiles) LatestSignatureForIdentity(ctx context.Context, id *snapshot.Identity) (*snapshot.Hash, error)
- func (s *LocalFiles) ListDirectorySnapshotContents(ctx context.Context, h *snapshot.Hash, f *snapshot.File) (snapshot.Tree, error)
- func (s *LocalFiles) PathInfoMatchesCache(ctx context.Context, p snapshot.Path, info os.FileInfo) bool
- func (s *LocalFiles) ReadObject(ctx context.Context, h *snapshot.Hash) (io.ReadCloser, error)
- func (s *LocalFiles) ReadSnapshot(ctx context.Context, h *snapshot.Hash) (*snapshot.File, error)
- func (s *LocalFiles) RemoveMappingForPath(ctx context.Context, p snapshot.Path) error
- func (s *LocalFiles) StoreObject(ctx context.Context, size int64, reader io.Reader) (h *snapshot.Hash, err error)
- func (s *LocalFiles) StoreSnapshot(ctx context.Context, p snapshot.Path, f *snapshot.File) (*snapshot.Hash, error)
- func (s *LocalFiles) UpdateSignatureForIdentity(ctx context.Context, id *snapshot.Identity, h *snapshot.Hash) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalFiles ¶
type LocalFiles struct {
ArchiveDir string
}
LocalFiles implementes the `snapshot.Storage` interface using the local file system.
It is used to write and read snapshots to persistent storage.
func (*LocalFiles) CachePathInfo ¶
func (*LocalFiles) Exclude ¶
func (s *LocalFiles) Exclude(p snapshot.Path) bool
Exclude reports whether or not the given path should be excluded from snapshotting.
This should return true for any paths that are part of the underlying persistent storage.
func (*LocalFiles) FindSnapshot ¶
func (*LocalFiles) LatestSignatureForIdentity ¶
func (*LocalFiles) ListDirectorySnapshotContents ¶
func (s *LocalFiles) ListDirectorySnapshotContents(ctx context.Context, h *snapshot.Hash, f *snapshot.File) (snapshot.Tree, error)
ListDirectorySnapshotContents returns the parsed `*snapshot.Tree` object listing the contents of `f`.
The supplied `*snapshot.File` object must correspond to a directory.
func (*LocalFiles) PathInfoMatchesCache ¶
func (*LocalFiles) ReadObject ¶
func (s *LocalFiles) ReadObject(ctx context.Context, h *snapshot.Hash) (io.ReadCloser, error)
func (*LocalFiles) ReadSnapshot ¶
func (*LocalFiles) RemoveMappingForPath ¶
func (*LocalFiles) StoreObject ¶
func (*LocalFiles) StoreSnapshot ¶
func (*LocalFiles) UpdateSignatureForIdentity ¶
Click to show internal directories.
Click to hide internal directories.