package
0.0.0-20240818021530-f5e744f7964a
Repository: https://github.com/kaisenlinux/docker.io.git
Documentation: pkg.go.dev

# Functions

AtomicWriteFile atomically writes data to a file named by filename.
NewAtomicFileWriter returns WriteCloser so that writing to it writes to a temporary file and closing it atomically changes the temporary file to destination path.
NewAtomicWriteSet creates a new atomic write set to atomically create a set of files.
NewBytesPipe creates new BytesPipe, initialized by specified slice.
NewCancelReadCloser creates a wrapper that closes the ReadCloser when the context is cancelled.
NewReadCloserWrapper returns a new io.ReadCloser.
NewReaderErrWrapper returns a new io.Reader.
NewWriteCloserWrapper returns a new io.WriteCloser.
NewWriteCounter returns a new WriteCounter.
NewWriteFlusher returns a new WriteFlusher.
NopWriteCloser returns a nopWriteCloser.

# Variables

ErrClosed is returned when Write is called on a closed BytesPipe.

# Structs

AtomicWriteSet is used to atomically write a set of files and ensure they are visible at the same time.
BytesPipe is io.ReadWriteCloser which works similarly to pipe(queue).
NopFlusher represents a type which flush operation is nop.
NopWriter represents a type which write operation is nop.
OnEOFReader wraps an io.ReadCloser and a function the function will run at the end of file or close the file.
ReadCloserWrapper wraps an io.Reader, and implements an io.ReadCloser It calls the given callback function when closed.
WriteCounter wraps a concrete io.Writer and hold a count of the number of bytes written to the writer during a "session".
WriteFlusher wraps the Write and Flush operation ensuring that every write is a flush.