All Projects → holys → Redis Cli

holys / Redis Cli

Licence: mit
A pure go implementation of redis-cli.

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Redis Cli

2019 12
🎟 급증하는 트래픽에도 안정적인 예약 서비스, Atomic Pattern을 적용한 재사용 가능한 컴포넌트, 실용적인 Testing을 주제로 하는 이벤트 서비스
Stars: ✭ 169 (-3.43%)
Mutual labels:  redis
Exceptionless
Exceptionless server and jobs
Stars: ✭ 2,107 (+1104%)
Mutual labels:  redis
Spoon
🥄 A package for building specific Proxy Pool for different Sites.
Stars: ✭ 173 (-1.14%)
Mutual labels:  redis
1backend
Run your web apps easily with a complete platform that you can install on any server. Build composable microservices and lambdas.
Stars: ✭ 2,024 (+1056.57%)
Mutual labels:  redis
Nginx Helper
Nginx Helper for WordPress caching, permalinks & efficient file handling in multisite
Stars: ✭ 170 (-2.86%)
Mutual labels:  redis
Seckill
基于Spring Boot的高性能秒杀系统
Stars: ✭ 171 (-2.29%)
Mutual labels:  redis
Albert
这个是我个人网站的项目,欢迎贡献代码,力求能够应用到实际工作中java相关的大多数技术栈。有兴趣请Star一下,非常感谢。qq交流群:587577705 这个项目将不断地更新!生产环境:
Stars: ✭ 168 (-4%)
Mutual labels:  redis
Operators
Collection of Kubernetes Operators built with KUDO.
Stars: ✭ 175 (+0%)
Mutual labels:  redis
Lad
👦 Lad is the best Node.js framework. Made by a former Express TC and Koa team member.
Stars: ✭ 2,112 (+1106.86%)
Mutual labels:  redis
Aioredlock
🔒 The asyncio implemetation of Redis distributed locks
Stars: ✭ 171 (-2.29%)
Mutual labels:  redis
Source Code Hunter
😱 从源码层面,剖析挖掘互联网行业主流技术的底层实现原理,为广大开发者 “提升技术深度” 提供便利。目前开放 Spring 全家桶,Mybatis、Netty、Dubbo 框架,及 Redis、Tomcat 中间件等
Stars: ✭ 7,392 (+4124%)
Mutual labels:  redis
Xpcms
基于node的cms系统, 后端采用node+koa+redis,并通过本人封装的redis库实现数据操作,前端采用vue+ts+vuex开发,后台管理系统采用react全家桶开发
Stars: ✭ 170 (-2.86%)
Mutual labels:  redis
Leaguestats
📈 League of Legends Stats Web App
Stars: ✭ 172 (-1.71%)
Mutual labels:  redis
Lyonblog
基于Java8的SSM+Elasticsearch全文检索的个人博客系统
Stars: ✭ 169 (-3.43%)
Mutual labels:  redis
Spring Examples
Spring Examples
Stars: ✭ 172 (-1.71%)
Mutual labels:  redis
Redis Resharding Proxy
Redis Resharding Proxy
Stars: ✭ 168 (-4%)
Mutual labels:  redis
Proxy pool
Python爬虫代理IP池(proxy pool)
Stars: ✭ 13,964 (+7879.43%)
Mutual labels:  redis
Spring Boot Plus
🔥 Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding. 🚀
Stars: ✭ 2,198 (+1156%)
Mutual labels:  redis
Redis3m
A C++ Redis client
Stars: ✭ 173 (-1.14%)
Mutual labels:  redis
Symfony Ddd Wishlist
Wishlist, a sample application on Symfony 3 and Vue.js built with DDD in mind
Stars: ✭ 172 (-1.71%)
Mutual labels:  redis

A pure Go Redis-cli

Go Report Card

This is a simple redis-cli forked from https://github.com/siddontang/ledisdb(ledis-cli). Fully compatible with Redis Protocol specification.

Features

  • Pure Go implementation
  • Full compatible with Redis Protocol specification
  • Basic support for hostname, port, auth, db
  • REPL
  • Non-interactively execute command
  • Raw format output
  • Monitor command support (both in REPL and execution directly)
  • CONNECT command support(example is as follows)

Install

To install, use go get

go get -u -v github.com/holys/redis-cli 

or download binary file from release.

Usage

$ ./redis-cli --help
Usage of ./redis-cli:
  -a string
        Password to use when connecting to the server
  -h string
        Server hostname (default "127.0.0.1")
  -n int
        Database number(default 0)
  -p int
        Server server port (default 6379)
  -raw
        Use raw formatting for replies
  -s string
        Server socket. (overwrites hostname and port)

Almost the same as the official redis-cli.

$ ./redis-cli
127.0.0.1:6379> get info
"{\"age\":1,\"name\":\"cdh\"}"

$ ./redis-cli --raw
127.0.0.1:6379> get info
{"age":1,"name":"cdh"}

$ ./redis-cli get info
"{\"age\":1,\"name\":\"cdh\"}"

$ ./redis-cli --raw get info
{"age":1,"name":"cdh"}

$ ./redis-cli monitor
OK
1483327130.764598 [0 127.0.0.1:61344] "PING"
1483327133.769646 [0 127.0.0.1:61344] "PING"
1483327136.768431 [0 127.0.0.1:61344] "PING"
1483327139.767084 [0 127.0.0.1:61344] "PING"
 ...

---
New command support: CONNECT host port [auth]

$ ./redis-cli
127.0.0.1:6379> set hostport "127.0.0.1:6379"
OK
127.0.0.1:6379> get hostport
"127.0.0.1:6379"
127.0.0.1:6379> connect 127.0.0.1 6380
connected 127.0.0.1:6380 successfully
127.0.0.1:6380> get hostport
(nil)
127.0.0.1:6380>

Play with GoTTY

gotty -w ./redis-cli --welcome

screenshot

Why I build this?

Sometimes I would like to access to the redis-server(or redis-proxy), but there is no redis-cli in the the production machine which is controlled by the ops guys, and I don't have the root privilege to install one via apt-get or yum. Some people may ask that why don't you ask the ops guys for help? I just don't want to bother them because somtimes they are very busy, and I just want the redis-cli for single use. People may be curious that why don't I git clone one from github and build it from source.

Ok, let me show you:

git clone https://github.com/antirez/redis.git
Initialized empty Git repository in /home/work/app/redis/.git/
remote: Counting objects: 45784, done.
remote: Compressing objects: 100% (92/92), done.
Receiving objects:   0% (62/45784), 20.01 KiB | 5 KiB/s

Receiving objects:   0% (291/45784), 84.01 KiB | 1 KiB/s

Receiving objects:   2% (1242/45784), 300.01 KiB | 7 KiB/s

The network condition really drives me crazy.

People who has C/C++ backrground must know that you can't simply copy a linux executable file from one machine to another and make it run successfully, because sometimes the target machine lacks of the matched glibc or other .so files.

$ ldd redis-cli
    linux-vdso.so.1 =>  (0x00007fffe93fe000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f17ff5f9000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f17ff3db000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f17ff015000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f17ff919000)

So I just want a pure go solution,build once, and run everywhere(aha Java).

Please correct me if I am wrong.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

LICENSE

MIT LICENSE, see LICENSE for details.

Author

David Chen (a.k.a holys)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].