 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
	Name    string    `json:"name"`         // filename
	Size    int64     `json:"size"`         // file size
	ModTime time.Time `json:"lastModified"` // last modified time
}
    File represents a single file in a manifest.
type FileWriter ¶
FileWriter is the interface used for writing a file to a snapshot.
type Manifest ¶
type Manifest struct {
	Files []File `json:"files"`
}
    Manifest represents a list of files in a snapshot.
func ReadFileManifest ¶
ReadFileManifest returns a Manifest for a given base snapshot path. This merges all incremental backup manifests as well.
type MultiReader ¶
type MultiReader struct {
	// contains filtered or unexported fields
}
    MultiReader reads from a collection of snapshots. Only files with the highest index are read from the reader. This type is not safe for concurrent use.
func NewMultiReader ¶
func NewMultiReader(readers ...io.Reader) *MultiReader
NewMultiReader returns a new MultiReader reading from a list of readers.
func OpenFileMultiReader ¶
func OpenFileMultiReader(path string) (*MultiReader, []io.Closer, error)
OpenFileMultiReader returns a MultiReader based on the path of the base snapshot. Returns the underlying files which need to be closed separately.
func (*MultiReader) Manifest ¶
func (ssr *MultiReader) Manifest() (*Manifest, error)
Manifest returns the combined manifest from all readers.
func (*MultiReader) Next ¶
func (ssr *MultiReader) Next() (File, error)
Next returns the next file in the reader.
type Reader ¶
type Reader struct {
	// contains filtered or unexported fields
}
    Reader reads a snapshot from a Reader. This type is not safe for concurrent use.
type Writer ¶
type Writer struct {
	// The manifest to write from.
	// Removing files from the manifest after creation will cause those files to be ignored.
	Manifest *Manifest
	// Writers for each file by filename.
	// Writers will be closed as they're processed and will close by the end of WriteTo().
	FileWriters map[string]FileWriter
}
    Writer writes a snapshot and the underlying files to disk as a tar archive.