Documentation ¶
Index ¶
Constants ¶
View Source
const DataFilePermission fs.FileMode = 0644
DataFilePermission permission of every single data file
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileIO ¶
type FileIO struct {
// contains filtered or unexported fields
}
FileIO Standard file I/O
type IOHandler ¶
type IOHandler interface { // Read Read corresponding data from the specific position of a file Read([]byte, int64) (int, error) // Write Write data to a file Write([]byte) (int, error) // Sync Persistent data Sync() error // Close Close a file Close() error // Size Get the size of a data file (unit: B) Size() (int64, error) }
IOHandler Abstract I/O interface
func NewIOHandler ¶
func NewIOHandler(t IOHandlerType, filePath string) (IOHandler, error)
NewIOHandler Constructs an IOHandler, such as FileIO
type IOHandlerType ¶
type IOHandlerType = int8
const ( FileIOHandler IOHandlerType = iota + 1 MMapIOHandler )
Click to show internal directories.
Click to hide internal directories.