Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename redis protocol to resp #237

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/client/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The idea of a CLI client comes from Redis, which builds `redis-cli` for easy
The idea of a CLI client comes from Redis, which builds `resp-cli` for easy
testing and interactive play. This is particularly useful for Redis because
the RESP protocol is more verbose than Memcached's ASCII protocol.

Expand Down
2 changes: 1 addition & 1 deletion src/client/resp_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(SOURCE

set(MODULES
client-network
protocol_redis
protocol_resp
util)

set(LIBS
Expand Down
2 changes: 1 addition & 1 deletion src/client/resp_cli/setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "core/data/server.h"

#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"

#include <buffer/cc_buf.h>
#include <buffer/cc_dbuf.h>
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_subdirectory(memcache)
add_subdirectory(ping)
add_subdirectory(redis)
add_subdirectory(resp)
6 changes: 0 additions & 6 deletions src/protocol/data/redis_include.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set(SOURCE
response.c
token.c)

add_library(protocol_redis ${SOURCE})
add_library(protocol_resp ${SOURCE})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <cc_debug.h>
#include <cc_print.h>

#define COMPOSE_MODULE_NAME "protocol::redis::compose"
#define COMPOSE_MODULE_NAME "protocol::resp::compose"

static bool compose_init = false;
static compose_req_metrics_st *compose_req_metrics = NULL;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <ctype.h>

#define PARSE_MODULE_NAME "protocol::redis::parse"
#define PARSE_MODULE_NAME "protocol::resp::parse"

static bool parse_init = false;
static parse_req_metrics_st *parse_req_metrics = NULL;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <cc_mm.h>
#include <cc_pool.h>

#define REQUEST_MODULE_NAME "protocol::redis::request"
#define REQUEST_MODULE_NAME "protocol::resp::request"

static bool request_init = false;
static request_metrics_st *request_metrics = NULL;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <cc_mm.h>
#include <cc_pool.h>

#define RESPONSE_MODULE_NAME "protocol::redis::response"
#define RESPONSE_MODULE_NAME "protocol::resp::response"

static bool response_init = false;
static response_metrics_st *response_metrics = NULL;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions src/protocol/data/resp_include.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "resp/compose.h"
#include "resp/token.h"
#include "resp/parse.h"
#include "resp/process.h"
#include "resp/request.h"
#include "resp/response.h"
2 changes: 1 addition & 1 deletion src/server/ds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(MODULES
core
ds_ziplist
protocol_admin
protocol_redis
protocol_resp
slab
time
util)
Expand Down
2 changes: 1 addition & 1 deletion src/server/ds/data/cmd_list.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "process.h"

#include "data_structure/ziplist/ziplist.h"
#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include "storage/slab/item.h"
#include "storage/slab/slab.h"

Expand Down
2 changes: 1 addition & 1 deletion src/server/ds/data/cmd_misc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "process.h"

#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include <cc_array.h>
#include <cc_debug.h>

Expand Down
2 changes: 1 addition & 1 deletion src/server/ds/data/process.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "process.h"

#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"

#include <buffer/cc_dbuf.h>
#include <cc_debug.h>
Expand Down
2 changes: 1 addition & 1 deletion src/server/ds/setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "core/core.h"
#include "storage/slab/item.h"
#include "storage/slab/slab.h"
#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include "time/time.h"

#include <buffer/cc_buf.h>
Expand Down
2 changes: 1 addition & 1 deletion src/server/ds/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "data/process.h"

#include "core/core.h"
#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include "storage/slab/item.h"
#include "storage/slab/slab.h"
#include "util/procinfo.h"
Expand Down
2 changes: 1 addition & 1 deletion src/server/slimds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(MODULES
cuckoo
ds_bitmap
protocol_admin
protocol_redis
protocol_resp
time
util)

Expand Down
2 changes: 1 addition & 1 deletion src/server/slimds/data/cmd_bitmap.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "process.h"

#include "data_structure/bitmap/bitset.h"
#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include "storage/cuckoo/cuckoo.h"
#include "time/time.h"

Expand Down
2 changes: 1 addition & 1 deletion src/server/slimds/data/cmd_misc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "process.h"

#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include <cc_array.h>
#include <cc_debug.h>

Expand Down
2 changes: 1 addition & 1 deletion src/server/slimds/data/process.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "process.h"

#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"

#include <buffer/cc_dbuf.h>
#include <cc_debug.h>
Expand Down
2 changes: 1 addition & 1 deletion src/server/slimds/setting.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "core/core.h"
#include "storage/cuckoo/cuckoo.h"
#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include "time/time.h"

#include <buffer/cc_buf.h>
Expand Down
2 changes: 1 addition & 1 deletion src/server/slimds/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "data/process.h"

#include "core/core.h"
#include "protocol/data/redis_include.h"
#include "protocol/data/resp_include.h"
#include "storage/cuckoo/cuckoo.h"
#include "util/procinfo.h"

Expand Down
2 changes: 1 addition & 1 deletion test/protocol/data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
add_subdirectory(memcache)
add_subdirectory(redis)
add_subdirectory(resp)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(suite redis)
set(suite resp)
set(test_name check_${suite})

set(source check_${suite}.c)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <protocol/data/redis_include.h>
#include <protocol/data/resp_include.h>

#include <buffer/cc_buf.h>
#include <cc_array.h>
Expand All @@ -11,7 +11,7 @@
#include <stdlib.h>

/* define for each suite, local scope due to macro visibility rule */
#define SUITE_NAME "redis"
#define SUITE_NAME "resp"
#define DEBUG_LOG SUITE_NAME ".log"

struct request *req;
Expand Down Expand Up @@ -561,7 +561,7 @@ END_TEST
* test suite
*/
static Suite *
redis_suite(void)
resp_suite(void)
{
Suite *s = suite_create(SUITE_NAME);

Expand Down Expand Up @@ -616,7 +616,7 @@ main(void)
/* setup */
test_setup();

Suite *suite = redis_suite();
Suite *suite = resp_suite();
SRunner *srunner = srunner_create(suite);
srunner_set_log(srunner, DEBUG_LOG);
srunner_run_all(srunner, CK_ENV); /* set CK_VEBOSITY in ENV to customize */
Expand Down