Documentation
¶
Index ¶
Constants ¶
View Source
const DataFilePerm = 0644 //0644 表示创建了一个文件,文件所有者可以读写,其他人只能读
View Source
const DefaultMemMapSize = 256 * 1024 * 1024
DefaultMemMapSize 最大映射内存大小
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bufio ¶
type Bufio struct {
// contains filtered or unexported fields
}
Bufio File IO with buffer
type FileIO ¶
type FileIO struct {
// contains filtered or unexported fields
}
FileIO 标准系统文件IO
func NewFileIOManager ¶
NewFileIOManager 初始化标准文件 IO
type IOManager ¶
type IOManager interface {
// Read 从文件的给定位置读取对应的数据
Read([]byte, int64) (int, error)
// Write 写入字节数组到文件中
Write([]byte) (int, error)
// Sync 持久化数据
Sync() error
// Close 关闭文件
Close() error
// Size get file size
Size() (int64, error)
}
IOManager 抽象 IO 管理接口, 可以接入不同的 IO 类型, 目前支持标准文件 IO
func NewIOManager ¶
type MMapIO ¶ added in v1.0.4
type MMapIO struct {
// contains filtered or unexported fields
}
MMapIO 标准系统文件IO
func NewMMapIOManager ¶ added in v1.0.4
NewMMapIOManager 初始化标准文件 IO
Click to show internal directories.
Click to hide internal directories.