Documentation ¶
Index ¶
- func SetLogPath(path string)
- type MEM
- func (m *MEM) AppendToLog(key, value string) error
- func (m *MEM) ConvertIntoEntries() []*entries.Entry
- func (m *MEM) DeleteLogFile() error
- func (m *MEM) Get(key string) (string, bool)
- func (m *MEM) GetTree() *redblacktree.Tree
- func (m *MEM) PopulateLogFile() error
- func (m *MEM) Put(key, val string) error
- func (m *MEM) Remove() error
- func (m *MEM) Size() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLogPath ¶
func SetLogPath(path string)
SetLogPath sets the folder in which all of the log are to be stored. The log directory is the same as the sstable directory.
Types ¶
type MEM ¶
type MEM struct {
// contains filtered or unexported fields
}
MEM represents the in-memory data
func CreateTableFromLog ¶
CreateTableFromLog constructs a memory table from the contents of a log file. This is used to check if some memtables were left in-memory when closing.
func (*MEM) AppendToLog ¶
AppendToLog takes in a key-value pair and appends that to the file pointer.
func (*MEM) ConvertIntoEntries ¶
ConvertIntoEntries converts the database key-value pairs into entries which are then used to write values to the disk
func (*MEM) DeleteLogFile ¶
DeleteLogFile deletes the log file after all of the values have been stored into an sstable
func (*MEM) GetTree ¶
func (m *MEM) GetTree() *redblacktree.Tree
GetTree returns the tree of the table. This is used for copying the data for flushing
func (*MEM) PopulateLogFile ¶
PopulateLogFile opens/creates the log file, and it handles settings the logFile file-pointer to the file with the logFilePath