-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gitsrc/master
thanks for pr
- Loading branch information
Showing
2 changed files
with
74 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef SLOCK_H | ||
#define SLOCK_H | ||
|
||
#include "../src/redismodule.h" | ||
#include <ctype.h> | ||
#include <string.h> | ||
|
||
static RedisModuleType *SLockType; | ||
|
||
typedef struct slock { | ||
mstime_t lock_time; | ||
unsigned long long client_id; | ||
} SLock; | ||
|
||
|
||
//Error message definition | ||
#define ERR_INVALID_EXPIRE_TIME "ERR invalid expireTime" | ||
|
||
//COMMAND TYPE | ||
#define COMMAND_SLOCK_UNLOCK "slock.unlock" | ||
#define COMMAND_SLOCK_LOCK "slock.lock" | ||
#define COMMAND_SLOCK_INFO "slock.info" | ||
|
||
|
||
//MODULE INFO | ||
#define MODULE_NAME "slock" | ||
#define MODULE_VERSION 1 | ||
|
||
#endif |