snapshot

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 NewLayeredMap(h func(string) (string, error)) *LayeredMap

func (*LayeredMap) Get

func (l *LayeredMap) Get(s string) (string, bool)

func (*LayeredMap) GetFlattenedPathsForWhiteOut

func (l *LayeredMap) GetFlattenedPathsForWhiteOut() map[string]struct{}

func (*LayeredMap) MaybeAdd

func (l *LayeredMap) MaybeAdd(s string) (bool, error)

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) Init

func (s *Snapshotter) Init() error

Init initializes a new snapshotter

func (*Snapshotter) TakeSnapshot

func (s *Snapshotter) TakeSnapshot(files []string) ([]byte, error)

TakeSnapshot takes a snapshot of the filesystem, 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

Jump to

Keyboard shortcuts

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