Skip to content

Bredis is a Redis-like database with similar functions and an HTTP API

License

Notifications You must be signed in to change notification settings

vadim-su/bredis

Repository files navigation

Bredis

Bredis is a Redis-like database with similar functions and an HTTP API.

Installation

cargo install bredis

Usage

bredis run

API

GET

curl http://localhost:4123/keys/mykey

GET BY PREFIX

curl http://localhost:4123/keys?prefix=my

SET

curl -X POST -H "Content-Type: application/json" -d "{\"key\":\"mykey\",\"value\":\"myvalue\"}" http://localhost:4123/keys

SET WITH EXPIRATION

curl -X POST -H "Content-Type: application/json" -d "{\"key\":\"mykey\",\"value\":\"myvalue\",\"ttl\":10}" http://localhost:4123/keys

DELETE

curl -X DELETE http://localhost:4123/keys/mykey

DELETE BY PREFIX

curl -X DELETE -H "Content-Type: application/json" -d "{\"prefix\":\"my\"}" http://localhost:4123/keys

FLUSH

curl -X DELETE http://localhost:4123/keys

GET TTL

curl http://localhost:4123/keys/mykey/ttl

SET TTL

curl -X POST -H "Content-Type: application/json" -d "{\"key\":\"mykey\",\"ttl\":10}" http://localhost:4123/keys/ttl

DELETE TTL

curl -X POST -H "Content-Type: application/json" -d "{\"key\":\"mykey, \"ttl\":-1}" http://localhost:4123/keys/ttl

ROADMAP

  • Add EXPIRE and TTL operations
  • Add pure in-memory rust backend
  • Support stream protocol (websocks, protobuf, resp?)

About

Bredis is a Redis-like database with similar functions and an HTTP API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published