Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultIteratorOptions = IteratorOptions{ Prefix: nil, Reverse: false, }
View Source
var DefaultOptions = Options{ DirPath: os.TempDir(), DataFileSize: 256 * 1024 * 1024, SyncWrite: false, IndexType: Btree, }
View Source
var DefaultWriteBatchOptions = WriteBatchOptions{ MaxBatchNum: 10000, SyncWrites: true, }
Functions ¶
This section is empty.
Types ¶
type IndexerType ¶
type IndexerType = int8
const ( // Btree 索引 Btree IndexerType = iota + 1 // ART (Adpative Radix Tree) 自适应基数树 ART )
type IteratorOptions ¶
type IteratorOptions struct {
// 遍历前缀为指定值的 Key,默认为空
Prefix []byte
// 是否反向遍历,默认 false 是正向
Reverse bool
}
IteratorOptions 索引迭代器配置项
type Options ¶
type Options struct {
DirPath string //数据库数据目录
DataFileSize int64 //数据文件的大小
SyncWrite bool // 每次写数据是否持久化
IndexType IndexerType
}
type TcpServerConfiguration ¶
TcpServerConfiguration define global tcp server config
var Configuration *TcpServerConfiguration
Configuration is global tcp server config
type WriteBatchOptions ¶
type WriteBatchOptions struct {
// 一个批次当中最大的数据量
MaxBatchNum uint
// 提交时是否 sync 持久化
SyncWrites bool
}
WriteBatchOptions 批量写入配置项
Click to show internal directories.
Click to hide internal directories.