simonwep / go-mini-kv

Miniature key-value database written in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Mini Key-Value Database

Go

A miniature key-value database written in go, functions implemented so far include:

  • Open(loc tring) - Opens a new database, files are stored under the folder specified via loc.
  • Set(key []byte, value []byte) error - Sets a new value, the value is immediately written to the database.
  • Get(key []byte) ([]byte, error) - Retrieves a value from the database.
  • Stat() (*DataBaseStats, error) - Returns statistical information about the current database, such as the size and amount of entries.
  • RunGC() error - Runs the garbage collector, compressing both the dictionary and the data file.

Things that are not yet implemented:

  • In-memory mode.
  • Transactions.
  • Backups.

...and many possible performance improvements.

About

Miniature key-value database written in go

License:MIT License


Languages

Language:Go 100.0%