repsheet / redis_module

A Redis Module to Handle the Repsheet Cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repsheet Redis Module

Module Commands

  • REPSHEET.BLACKLIST - Blacklist an IP Address
  • REPSHEET.WHITELIST - Whitelist an IP Address
  • REPSHEET.MARK - Mark an IP Address
  • REPSHEET.STATUS - Get the Status of an IP Address
  • REPSHEET.VERSION - Get the Current Version

Quick Start Guide

  1. Build the module by running make
  2. Run redis loading the module: /path/to/redis-server --loadmodule ./repsheet.so

Now run redis-cli and try the commands:

127.0.0.1:6379> REPSHEET.BLACKLIST 1.1.1.1 manual
OK
127.0.0.1:6379> keys *
1) "1.1.1.1:repsheet:ip:blacklisted"
127.0.0.1:6379> get 1.1.1.1:repsheet:ip:blacklisted
"manual"
127.0.0.1:6379> REPSHEET.STATUS 1.1.1.1
BLACKLISTED

About

A Redis Module to Handle the Repsheet Cache

License:MIT License


Languages

Language:C 95.6%Language:Makefile 1.6%Language:C++ 1.5%Language:Python 0.9%Language:Dockerfile 0.3%