Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParallelFileCreator ¶ added in v1.110.15
type ParallelFileCreator struct {
// contains filtered or unexported fields
}
ParallelFileCreator is used for parallel creating of files for the given dstPath.
ParallelFileCreator is needed for speeding up creating many files on high-latency storage systems such as NFS or Ceph.
func (*ParallelFileCreator) Add ¶ added in v1.110.15
func (pfc *ParallelFileCreator) Add(dstPath string, wc *WriteCloser, nocache bool)
Add registers a task for creating the file at dstPath and assigning it to *wc.
Tasks are executed in parallel on Run() call.
func (*ParallelFileCreator) Run ¶ added in v1.110.15
func (pfc *ParallelFileCreator) Run()
Run runs all the registered tasks for creating files in parallel.
type ParallelFileOpener ¶ added in v1.110.15
type ParallelFileOpener struct {
// contains filtered or unexported fields
}
ParallelFileOpener is used for parallel opening of files at the given dstPath.
ParallelFileOpener is needed for speeding up opening many files on high-latency storage systems such as NFS or Ceph.
func (*ParallelFileOpener) Add ¶ added in v1.110.15
func (pfo *ParallelFileOpener) Add(path string, rc *ReadCloser, nocache bool)
Add registers a task for opening the file ath the given path and assigning it to *rc.
Tasks are executed in parallel on Run() call.
func (*ParallelFileOpener) Run ¶ added in v1.110.15
func (pfo *ParallelFileOpener) Run()
Run runs all the registered tasks for opening files in parallel.
type ParallelStreamWriter ¶ added in v1.110.15
type ParallelStreamWriter struct {
// contains filtered or unexported fields
}
ParallelStreamWriter is used for parallel writing of data from io.WriterTo to the given dstPath files.
ParallelStreamWriter is needed for speeding up writing data to many files on high-latency storage systems such as NFS or Ceph.
func (*ParallelStreamWriter) Add ¶ added in v1.110.15
func (psw *ParallelStreamWriter) Add(dstPath string, src io.WriterTo)
Add adds a task to execute in parallel - to write the data from src to the dstPath.
Tasks are executed in parallel on Run() call.
func (*ParallelStreamWriter) Run ¶ added in v1.110.15
func (psw *ParallelStreamWriter) Run()
Run executes all the tasks added via Add() call in parallel.
type ReadCloser ¶
ReadCloser is a standard interface for filestream Reader.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements buffered file reader.
func MustOpen ¶ added in v1.91.0
MustOpen opens the file from the given path in nocache mode.
If nocache is set, then the reader doesn't pollute OS page cache.
func OpenReaderAt ¶ added in v1.29.0
OpenReaderAt opens the file at the given path in nocache mode at the given offset.
If nocache is set, then the reader doesn't pollute OS page cache.
type WriteCloser ¶
WriteCloser is a standard interface for filestream Writer.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer implements buffered file writer.
func MustCreate ¶ added in v1.91.0
MustCreate creates the file for the given path in nocache mode.
If nocache is set, the writer doesn't pollute OS page cache.
func OpenWriterAt ¶ added in v1.29.0
OpenWriterAt opens the file at path in nocache mode for writing at the given offset.
The file at path is created if it is missing.
If nocache is set, the writer doesn't pollute OS page cache.
func (*Writer) MustClose ¶
func (w *Writer) MustClose()
MustClose syncs the underlying file to storage and then closes it.