Discover Packages
github.com/Scalingo/go-utils/io
package
module
Version:
v1.1.1
Opens a new window with list of versions in this module.
Published: Jun 9, 2022
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
README
¶
Package io
v1.1.1
This package aims at proposing a customizable io.Copy
method. It introduces the Copier
struct.
Usage
Constructor:
NewCopier(...CopierOpt)
List of Options:
WithBufferSize(int64)
WithNoDiskCacheRead
WithNoDiskCacheWrite
WithNoDiskCache
(helper wrapping the two above)
Expand ▾
Collapse ▴
Documentation
¶
func WithNoDiskCache(c *Copier )
func WithNoDiskCacheRead(c *Copier )
func WithNoDiskCacheWrite(c *Copier )
copyContent is highly inspired from io.Copy, but calls to fadvise have been
added to prevent caching the whole content of the files during the process,
impacting the whole OS disk cache
type CopierOpt func(c *Copier )
type Fder interface {
Fd() uintptr
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.