Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SET set cmd SET int = iota // GET get cmd GET // DEL cmd DEL )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KvStore ¶
type KvStore interface { Set(key string, value string) Get(key string) (value string) Del(key string) }
KvStore KvStore
type LSMKvStore ¶
type LSMKvStore struct { Index *avl.Tree // 内存表 ImmutableIndex *avl.Tree // 不可变的内存表 SstTables *sll.List // sstTable列表 DataDir string // 目录 Lock sync.RWMutex StoreThreshold int64 PartSize int64 WalFile *os.File }
LSMKvStore LSMKvStore
func InitLSMKvStore ¶
func InitLSMKvStore(dataDir string, storeThreshold int64, partSize int64) (lSMKvStore *LSMKvStore, err error)
InitLSMKvStore InitLSMKvStore
type SSTTable ¶
type SSTTable struct { MetaInfo SSTTableMetaInfo SparseIndex *avl.Tree TableFile *os.File FilePath string }
SSTTable ssttable
func CreateFromFile ¶
CreateFromFile create
func CreateFromIndex ¶
CreateFromIndex create
func InitSstTable ¶
InitSstTable init
Click to show internal directories.
Click to hide internal directories.