redis

command module
v0.0.0-...-a39819d Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2016 License: GPL-3.0 Imports: 5 Imported by: 0

README

redis

  • In-Memory Data Store.
  • Implements subset of Redis commands.
  • Command reply is according to Redis Protocol.

Commands supported

  • GET
  • GETBIT
  • QUIT
  • SAVE
  • SET
  • SETBIT
  • ZADD
  • ZCARD
  • ZCOUNT
  • ZRANGE

Description

  • Redis server listens to TCP port 15000 for all the incomming requests.
  • Server loads all the key-value pairs to cache from the db file at the start up.
  • During exit(CTRL+C/SIGINT) cache is saved to json file.

Cache

  • Cache is made up of buckets.
  • Buckets hold key-value pair.
  • To distribute the cache load, number of buckets in the cache can be increased/decreased which is conifigurable.

Prerequisites

Installation

$ go get 'github.com/madhusudhancs/redis' $ cd $GOPATH/src/github.com/madhusudhancs/redis

  • Build the server
    • go build
  • To list the options available
    • ./redis -h
  • To start the server
    • ./redis -f <Absolute_PATH_TO_JSON_FILE>
      • ./redis -f ./db/dump.json
      • Ensure empty file ./db/dump.json is created in the path

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
get
set
log
Package log is a simple wrapper over golang std logger for minimal log level support.
Package log is a simple wrapper over golang std logger for minimal log level support.

Jump to

Keyboard shortcuts

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