modulepackage
0.0.0-20201228211448-461d23698e27
Repository: https://github.com/drakew/go-db-engine.git
Documentation: pkg.go.dev
# README
go-db-engine
Writing a log structured database engine from scratch (for learning purpose only)
# Packages
No description provided by the author
# Functions
ConfigDBDir - configures the DB directory location.
ConfigLogLevel - configures the log level of the database, default to WARN.
ConfigMemtableSizeByte - configures roughly how much data (in bytes) should be saved into the storage in memroy before it gets flushed into disk.
ConfigSStableDatablockSizeByte - configures how much data (in bytes) should be stored for each data block in the underlying sstable file.
ConfigWalStrictMode - configures if strict mode should be turned on or not for the wal (write-ahead-log).
NewBasicMemTable - create a new memtable instance TODO: (p3) make the memtable implementaion thread-safe.
NewBasicSSTableIndex - creates a new basic sstable index.
NewBasicSSTableReader - creates a new `SSTableReader` instance that handles reading data from sstable file.
NewBasicSSTableWriter - creates a new `SSTableWriter` instance along with newly created sstable file.
NewBasicWal - creates a new WAL instance and an underlying WAL file if `syncOnWrite` is set to true, each write operation will always be flushed to the storage device.
NewDatabase - creates a new database instance.
NewWalFile - creates a new WAL file with name "wal_<unix timestamp>" under `walDir` if `syncOnWrite` is set to true, each write operation will always be flushed to the storage device.
ReadDataWithVarintPrefix - read a varint prefixed data block into buf.
WriteDataWithVarintSizePrefix - writes data to w with a varint size prefix.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
BasicSSTable - a basic implementation of the `SSTableReader` and `SSTableWriter` interface.
BasicSSTableIndex - a basic implementation of the `SSTableIndex` interface.
BasicWal - implements the `Wal` interface.
BasicWalLog - represents a WAL log record.
Database - something that you can write data to and read data from.
DBSetting - sepcifies the various configurations of the database that are customizable.
MemtableRecord - represents a single inserted record.
SkipListMemTable - A memtable implementation using the skip list data structure.
SSTableError - includes error for specifc sstable operation.
SSTableFileMetadata - metadata about sstable file.
WalError - wraps errors with WAL operation and basic information before the error happens.
# Interfaces
MemTable - A memtable handles the in-memory operatoins of the DB on data that has not been persisted into the file system.
SSTableIndex - represents an index for a SSTable file.
SSTableReader - represents a reader that reads data from a sstable file.
SSTableWriter - represents a writer that dump content into a sstable file.
VarintSizePrefixDataReader - a reader interface for varint prefixed data.
Wal - represents a write-ahead-log.
WalFile - file interface that defines basic methods needed for WAL operations the interface can be satisfied by `os.File`.
# Type aliases
DBConfig - configuration function for db setting.