Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type WriteSet ¶
type WriteSet struct {
// contains filtered or unexported fields
}
WriteSet is used to atomically write a set of files and ensure they are visible at the same time. Must be committed to a new directory.
func NewWriteSet ¶
NewWriteSet creates a new atomic write set to atomically create a set of files. The given directory is used as the base directory for storing files before commit. If no temporary directory is given the system default is used.
func (*WriteSet) Commit ¶
Commit moves all created files to the target directory. The target directory must not exist and the parent of the target directory must exist.
func (*WriteSet) FileWriter ¶
FileWriter opens a file writer inside the set. The file should be synced and closed before calling commit.
Click to show internal directories.
Click to hide internal directories.