An open API service indexing awesome lists of open source software.

https://github.com/asynched/gokvdb

A key-value database similar to memcached written in Go.
https://github.com/asynched/gokvdb

database go

Last synced: 3 months ago
JSON representation

A key-value database similar to memcached written in Go.

Awesome Lists containing this project

README

          

# gokvdb

A key-value database similar to memcached written in Go.

## Installation

### Requirements

- Go
- GNU/Make

### Build

Build the server with:

```sh
make server
```

> This will generate a `bin/server` executable

Build the client with:

```sh
make client
```

> This will generate a `bin/client` executable

### Commands

#### SET

Sets a new entry in the database with a key, value and time to live in seconds (ttl).

```sh
# SET key value ttl
?> SET name asynched 10
```

#### GET

Retrieves the value of a key from the database.

```sh
# GET key
?> GET name
```

#### DELETE

Deletes a key from the database.

```sh
# DELETE key
?> DELETE name
```

#### FLUSHALL

Deletes all keys from the database.

```sh
# FLUSHALL
?> FLUSHALL
```