larry

module
v0.0.0-...-390e31f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: MIT

README

Larry

Larry is a common interface for writing Go code using different key-value (kv) databases. It provides a unified API, making it easier to switch between different databases without changing your application logic.

Getting Started

Prerequisites
Installing

From your project, run the following command to retrieve the library:

go get github.com/hemilabs/larry

Features

Larry was originally designed to be integrated into other Hemi projects and repositories, as such it provides:

  • Unified Interface: Interact with multiple KV databases using a consistent API.
  • Database Support: Easily extendable to support various KV databases.
  • Simple Integration: Quick setup and integration into your existing Go projects.

Supported Databases

The focus of Larry is not to create and maintain a series of database implementations. However, several databases were adapted to conform to the Larry API, which you may use / modify for your own use-case:

KV Databases
Database Driver Status
levelDB github.com/syndtr/goleveldb Supported
pebble github.com/cockroachdb/pebble Supported
General Purpose
Database Driver Status
clickhouse github.com/ClickHouse/clickhouse-go Supported

Multi

MultiDB is a multiplexer to multiple Larry API compliant databases, where each is accessed as a table.

This allows one to separate database tables into multiple files, use a different larry database implementation per table, as well as lock transactions to a specific table, rather than the entire database.

Replicator

The Replicator implementation can be used to copy and "translate" the contents of one Larry API compliant database to another (e.g., leveldb to mongoDB).

It functions by keeping a log of the operations performed in the source DB using the Larry API, which are then replayed in the destination DB, either in a synchronous (direct mode) or asynchronous (lazy mode) manner.

Replicator Diagram

License

This project is licensed under the MIT License.

Directories

Path Synopsis
internal
clickhouse
Package clickhouse implements a Larry database backend using clickhouse.
Package clickhouse implements a Larry database backend using clickhouse.
leveldb
Package leveldb implements a Larry database backend using leveldb.
Package leveldb implements a Larry database backend using leveldb.
multi
Package multi implements multi DB, a database multiplexer.
Package multi implements multi DB, a database multiplexer.
pebble
Package pebble implements a Larry database backend using pebble.
Package pebble implements a Larry database backend using pebble.
replicator
Package replicator implements a replicator, used to replay and translate operations performed in a Larry database, to another.
Package replicator implements a replicator, used to replay and translate operations performed in a Larry database, to another.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL