Documentation
¶
Index ¶
- type LayeredMap
- func (l *LayeredMap) Add(s string) error
- func (l *LayeredMap) Get(s string) (string, bool)
- func (l *LayeredMap) GetFlattenedPathsForWhiteOut() map[string]struct{}
- func (l *LayeredMap) GetWhiteout(s string) (string, bool)
- func (l *LayeredMap) Key() (string, error)
- func (l *LayeredMap) MaybeAdd(s string) (bool, error)
- func (l *LayeredMap) MaybeAddWhiteout(s string) bool
- func (l *LayeredMap) Snapshot()
- type Snapshotter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LayeredMap ¶
type LayeredMap struct {
// contains filtered or unexported fields
}
func NewLayeredMap ¶
func (*LayeredMap) Add ¶ added in v0.4.0
func (l *LayeredMap) Add(s string) error
Add will add the specified file s to the layered map.
func (*LayeredMap) GetFlattenedPathsForWhiteOut ¶
func (l *LayeredMap) GetFlattenedPathsForWhiteOut() map[string]struct{}
GetFlattenedPathsForWhiteOut returns all paths in the current FS
func (*LayeredMap) GetWhiteout ¶ added in v0.4.0
func (l *LayeredMap) GetWhiteout(s string) (string, bool)
func (*LayeredMap) Key ¶ added in v0.4.0
func (l *LayeredMap) Key() (string, error)
Key returns a hash for added files
func (*LayeredMap) MaybeAdd ¶
func (l *LayeredMap) MaybeAdd(s string) (bool, error)
MaybeAdd will add the specified file s to the layered map if the layered map's hashing function determines it has changed. If it has not changed, it will not be added. Returns true if the file was added.
func (*LayeredMap) MaybeAddWhiteout ¶ added in v0.4.0
func (l *LayeredMap) MaybeAddWhiteout(s string) bool
func (*LayeredMap) Snapshot ¶
func (l *LayeredMap) Snapshot()
type Snapshotter ¶
type Snapshotter struct {
// contains filtered or unexported fields
}
Snapshotter holds the root directory from which to take snapshots, and a list of snapshots taken
func NewSnapshotter ¶
func NewSnapshotter(l *LayeredMap, d string) *Snapshotter
NewSnapshotter creates a new snapshotter rooted at d
func (*Snapshotter) Key ¶ added in v0.4.0
func (s *Snapshotter) Key() (string, error)
Key returns a string based on the current state of the file system
func (*Snapshotter) TakeSnapshot ¶
func (s *Snapshotter) TakeSnapshot(files []string) (string, error)
TakeSnapshot takes a snapshot of the specified files, avoiding directories in the whitelist, and creates a tarball of the changed files. Return contents of the tarball, and whether or not any files were changed
func (*Snapshotter) TakeSnapshotFS ¶ added in v0.4.0
func (s *Snapshotter) TakeSnapshotFS() (string, error)
TakeSnapshotFS takes a snapshot of the filesystem, avoiding directories in the whitelist, and creates a tarball of the changed files.