Skip to content

goedelsoup/rocks4s

Repository files navigation

rocks4s

Pure functional wrapper for RocksDB


Features

Frontends
Serialization
  • Avro
  • Circe
  • Protocol Buffers
Persistence
  • AWS S3
  • Azure Blob Storage
  • GCP Cloud Storage
Distributed Data
  • etcd
  • Consul

Usage

Construct a database instance and running operations:

import cats._
import cats.effect._
import cats.implicits._

import rocks4s._
import org.rocksdb.Options

object Example extends IOApp {

  def run(args: List[String]): IO[ExitCode] =
    RocksDB[IO](".rocks", new Options().setCreateOnMissing(true))
      .use { rocks =>
        for {
          _ <- rocks.put("foo", "bar")
          v <- rocks.get("foo")
          _ <- IO(println(s"Retrieved value $v"))
        } yield ExitCode.Success
      }
}

See the examples project for more thorough usage.

About

Pure functional wrapper for RocksDB

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages