Keyspace events notification API.

This commit is contained in:
antirez
2013-01-23 16:23:33 +01:00
parent 153766e137
commit 212edbc409
7 changed files with 108 additions and 3 deletions

View File

@ -646,6 +646,7 @@ struct redisServer {
/* Pubsub */
dict *pubsub_channels; /* Map channels to list of subscribed clients */
list *pubsub_patterns; /* A list of pubsub_patterns */
int notify_keyspace_events; /* Propagate keyspace events via Pub/Sub. */
/* Scripting */
lua_State *lua; /* The Lua interpreter. We use just one for all clients */
redisClient *lua_client; /* The "fake client" to query Redis from Lua */
@ -999,6 +1000,7 @@ int pubsubUnsubscribeAllPatterns(redisClient *c, int notify);
void freePubsubPattern(void *p);
int listMatchPubsubPattern(void *a, void *b);
int pubsubPublishMessage(robj *channel, robj *message);
void notifyKeyspaceEvent(char *event, robj *key, int dbid);
/* Configuration */
void loadServerConfig(char *filename, char *options);