Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendableLookupFile ¶
type AppendableLookupFile interface {
LookupFileWithSize
}
AppendableLookupFile is a LookupFile that may be optimized for the following scenario. The file typically grows by aggressive appending, one element at a time.
func NewAppendOptimizedFile ¶
func NewAppendOptimizedFile(file *os.File) AppendableLookupFile
type LookupFile ¶
LookupFile is a file-like array-like object. The file has array elements each a fixed number of bytes. Elements are written or read one at a time. By referring to io interfaces, we can arrange for os.File to be a naive non-optimized implementation.
type LookupFileWithSize ¶
type LookupFileWithSize interface {
LookupFile
Stat() (os.FileInfo, error)
}
type SparseLookupFile ¶
type SparseLookupFile interface {
LookupFile
}
SparseLookupFile is a LookupFile that may be optimized for the following scenario. The file is fixed size, and starts life full of zeros. Elements are written or read one at a time.
func NewFixedSizeMemFile ¶
func NewFixedSizeMemFile(filename string, perm os.FileMode) (SparseLookupFile, error)
NewFixedSizeMemFile Opens the file and keeps a copy in memory