Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUninitializedWriter = fmt.Errorf("tried to write to source before Resume() was called")
Functions ¶
This section is empty.
Types ¶
type Bowl ¶
type Bowl interface { // phase 1: patching Resume(checkpoint *BowlCheckpoint) error Save() (*BowlCheckpoint, error) GetWriter(index int64) (EntryWriter, error) Transpose(transposition Transposition) error // phase 2: committing Commit() error // cleanups Close() error }
func NewDryBowl ¶
func NewDryBowl(params *DryBowlParams) (Bowl, error)
NewDryBowl returns a bowl that throws away all writes
func NewFreshBowl ¶
func NewFreshBowl(params FreshBowlParams) (Bowl, error)
NewFreshBowl returns a bowl that applies all writes to a given (initially empty) directory.
func NewOverlayBowl ¶
func NewOverlayBowl(params OverlayBowlParams) (Bowl, error)
func NewPoolBowl ¶
func NewPoolBowl(params PoolBowlParams) (Bowl, error)
NewPoolBowl returns a bowl that applies all writes to a writable pool
type BowlCheckpoint ¶
type BowlCheckpoint struct {
Data interface{}
}
type DryBowlParams ¶
type EntryWriter ¶
type EntryWriter interface { Resume(checkpoint *WriterCheckpoint) (int64, error) Save() (*WriterCheckpoint, error) Tell() int64 Finalize() error io.WriteCloser }
type FreshBowlParams ¶
type Ghost ¶
A Ghost is a file, directory, or symlink, that has disappeared from one container (target) to the next (source)
type GhostKind ¶
type GhostKind int
GhostKind determines what went missing: a file, a directory, or a symlink
const ( // GhostKindDir indicates that a directory has disappeared between two containers GhostKindDir GhostKind = iota + 0xfaf0 // GhostKindFile indicates that a file has disappeared between two containers GhostKindFile // GhostKindSymlink indicates that a symbolic link has disappeared between two containers GhostKindSymlink )
type OverlayBowlCheckpoint ¶
type OverlayBowlCheckpoint struct { Transpositions []Transposition OverlayFiles []int64 MoveFiles []int64 }
type OverlayBowlParams ¶
type PoolBowlParams ¶
type Transposition ¶
type WriterCheckpoint ¶
type WriterCheckpoint struct { Offset int64 Data interface{} }
Click to show internal directories.
Click to hide internal directories.