Skip to content

Commit 2c05c49

Browse files
feat(server): 重构协议解析和订阅管理
- 新增 ProtocolParser 类,负责协议解析逻辑 - 新增 PubSubSession 类,专门处理 PubSub 相关功能 - 重构 Session 类,使用新添加的 ProtocolParser 和 PubSubSession - 优化代码结构,提高可维护性和可扩展性 feat(data): 实现 Hash、List、Set、ZSet 数据类型 - 新增 AstraHash、AstraList、AstraSet、AstraZSet 类实现 - 添加相关命令支持,包括 HSET、LPUSH、SADD、ZADD 等 - 更新 CommandImpl.hpp,增加新命令的定义和说明
1 parent dad15f2 commit 2c05c49

File tree

11 files changed

+1739
-241
lines changed

11 files changed

+1739
-241
lines changed

Astra-CacheServer/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
set(PROJECT_NAME "Astra-CacheServer")
22

3+
# 设置相对安装路径
4+
set(CMAKE_INSTALL_RELDIR "astra" CACHE STRING "Relative installation directory for Astra projects")
5+
36
set(CMAKE_INCLUDE_CURRENT_DIR ON)
47

58
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
@@ -13,6 +16,7 @@ set(SERVER_SOURCE
1316
persistence/util_path.cpp
1417
persistence/process.cpp
1518
persistence/process.cpp
19+
proto/ProtocolParser.cpp
1620
)
1721

1822
# WINDOWS 平台特有的文件
@@ -52,10 +56,10 @@ add_subdirectory(examples)
5256

5357
# install 安装Astra-CacheSDK的头文件和库文件
5458
install(TARGETS Astra-CacheSDK
55-
RUNTIME DESTINATION bin
56-
LIBRARY DESTINATION lib
57-
ARCHIVE DESTINATION lib
58-
INCLUDES DESTINATION include
59+
RUNTIME DESTINATION ${CMAKE_INSTALL_RELDIR}/bin
60+
LIBRARY DESTINATION ${CMAKE_INSTALL_RELDIR}/lib
61+
ARCHIVE DESTINATION ${CMAKE_INSTALL_RELDIR}/lib
62+
INCLUDES DESTINATION ${CMAKE_INSTALL_RELDIR}/include
5963
CONFIGURATIONS Release
6064
COMPONENT applications
6165
)
@@ -64,7 +68,7 @@ install(FILES sdk/astra_client_c.h sdk/astra_client_labview.h sdk/astra_resp.h D
6468
install(FILES ../core/macros.hpp DESTINATION include/core COMPONENT applications)
6569

6670
# install 写入
67-
install(TARGETS Astra-CacheServer RUNTIME DESTINATION bin COMPONENT applications)
71+
install(TARGETS Astra-CacheServer RUNTIME DESTINATION ${CMAKE_INSTALL_RELDIR}/bin COMPONENT applications)
6872

6973
# install 指定release
70-
install(TARGETS Astra-CacheServer RUNTIME DESTINATION bin CONFIGURATIONS Release COMPONENT applications)
74+
install(TARGETS Astra-CacheServer RUNTIME DESTINATION ${CMAKE_INSTALL_RELDIR}/bin CONFIGURATIONS Release COMPONENT applications)

0 commit comments

Comments
 (0)