Skip to content

Puneet-Pal-Singh/go-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-redis

Github top language

About   |   Features   |   References   |   Requirements   |   Installation   |   Contribution   |   License   |   Author


🎯 About

This project is a Redis-like server implemented in Go. It supports a variety of Redis commands across different data types, including Strings, Lists, Hashes, Sets, and Sorted Sets. Additionally, it provides basic server, connection, and persistence commands.

✨ Features

✔️ Available commands

  • String Commands: SET, GET, DEL, EXISTS, INCR, DECR, INCRBY, DECRBY, MSET, MGET
  • List Commands: LPUSH, RPUSH, LPOP, RPOP, LLEN
  • Hash Commands: HSET, HGET, HDEL, HLEN, HMGET, HGETALL
  • Set Commands: SADD, SREM, SMEMBERS, SISMEMBER
  • Sorted Set Commands: ZADD, ZRANGE, ZREM
  • Server and Connection Commands: EXPIRE, TTL, INFO, FLUSHALL, PING
  • Persistence Commands: SAVE, BGSAVE

✔️ Persistence commands Saves data to disk and loads it on startup.

✔️ publish/subscribe functionality for real-time messaging.

🚀 References

✅ Requirements

Before starting 🏁, you need to have Git and Go installed or Docker (optional, for containerization).

🏁 Installation

  1. Clone the repository:

    git clone https://github.com/Puneet-Pal-Singh/go-redis.git
    cd go-redis
  2. Install dependencies:

    go mod download
  3. Build the application:

    go build -o go-redis

Running the Application

You can run the application directly or use Docker.

Directly

 go run ./main

Using Docker

  1. Build the Docker image:

    docker build -t go-redis .
  2. Run the Docker container:

    docker run -p 6378:6378 go-redis

Usage

Once the server is running, you can connect to it using a Redis client or through a terminal. The server listens on port 6378.

Example Commands

  • Set a value:

    SET key value
  • Get a value:

    GET key
  • Delete a key:

    DEL key

🔥 Contribution

Contributions are welcome! Please open an issue or submit a pull request for any improvements or features.

📝 License

This project is under license from MIT. For more details, see the LICENSE file.

Made with ❤️ by Puneet Pal Singh

 

Back to top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published