Overview

KVS is a key-value store written in Go. It provides an in-memory store that can be used as a library, via its CLI, or as a server with HTTP and gRPC interfaces.

Features

Installation

From source

go install github.com/skyoo2003/kvs/cmd/kvs@latest

Docker

docker run ghcr.io/skyoo2003/kvs:latest-alpine

Homebrew

brew install skyoo2003/tap/kvs

Quick Start

CLI

kvs serve                     # start HTTP (:3456) and gRPC (:3457) servers
kvs serve --http-addr :8080   # custom HTTP address
kvs version                   # print version

Library

Import github.com/skyoo2003/kvs to use KVS as a library:

package main

import (
	"fmt"
	"github.com/skyoo2003/kvs"
)

func main() {
	store := kvs.NewStore()
	_ = store.Put("language", "go")

	value, _ := store.Get("language")
	fmt.Println(value)
}

License

MIT License. See LICENSE for details.