Documentation
¶
Index ¶
Constants ¶
View Source
const (
ChecksumFailed checkError = "Checksum Failed: Capacity may not be truthful"
)
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check will write at least `bytes` bytes to a file within `dir`, read the file, and verify that the written checksum matches the read checksum.
func CheckWithOptions ¶
CheckWithOptions does the same as Check, but provides options that can be set to get hooks into the in-progress check.
Types ¶
type CheckOptions ¶
type CheckOptions struct {
//BufferSize will override the default read/write buffer size, in bytes
BufferSize uint64
//OnWrite will be called after each write to the file with the total number of bytes
//written and the expected maximum number of bytes that will be written in total
OnWrite func(written uint64, max uint64)
//OnRead will be called after each read from the file with the total number of bytes
//read and the expected maximum number of bytes that will be read in total
OnRead func(read uint64, max uint64)
//DebugF will write debug information without newline termination
DebugF func(format string, args ...interface{})
}
Click to show internal directories.
Click to hide internal directories.