Skip to content

Commit

Permalink
Rename ValkeyModuleEvent_MasterLinkChange to RedisModuleEvent_Primary…
Browse files Browse the repository at this point in the history
…LinkChange

Signed-off-by: 0del <bany.y0599@gmail.com>
  • Loading branch information
9bany committed Apr 8, 2024
1 parent 6411629 commit db0633d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -11511,7 +11511,7 @@ static uint64_t moduleEventVersions[] = {
*
* int32_t hz; // Approximate number of events per second.
*
* * ValkeyModuleEvent_MasterLinkChange
* * ValkeyModuleEvent_PrimaryLinkChange
*
* This is called for replicas in order to notify when the
* replication link becomes functional (up) with our master,
Expand Down
2 changes: 1 addition & 1 deletion src/redismodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
#define RedisModuleEvent_Shutdown ValkeyModuleEvent_Shutdown
#define RedisModuleEvent_ReplicaChange ValkeyModuleEvent_ReplicaChange
#define RedisModuleEvent_CronLoop ValkeyModuleEvent_CronLoop
#define RedisModuleEvent_MasterLinkChange ValkeyModuleEvent_MasterLinkChange
#define RedisModuleEvent_PrimaryLinkChange ValkeyModuleEvent_PrimaryLinkChange
#define RedisModuleEvent_ModuleChange ValkeyModuleEvent_ModuleChange
#define RedisModuleEvent_LoadingProgress ValkeyModuleEvent_LoadingProgress
#define RedisModuleEvent_SwapDB ValkeyModuleEvent_SwapDB
Expand Down
2 changes: 1 addition & 1 deletion src/valkeymodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ static const ValkeyModuleEvent
VALKEYMODULE_EVENT_CRON_LOOP,
1
},
ValkeyModuleEvent_MasterLinkChange = {
ValkeyModuleEvent_PrimaryLinkChange = {
VALKEYMODULE_EVENT_PRIMARY_LINK_CHANGE,
1
},
Expand Down
2 changes: 1 addition & 1 deletion tests/modules/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
RedisModule_SubscribeToServerEvent(ctx,
RedisModuleEvent_ReplicaChange, replicationChangeCallback);
RedisModule_SubscribeToServerEvent(ctx,
RedisModuleEvent_MasterLinkChange, rasterLinkChangeCallback);
RedisModuleEvent_PrimaryLinkChange, rasterLinkChangeCallback);

/* persistence related hooks */
RedisModule_SubscribeToServerEvent(ctx,
Expand Down

0 comments on commit db0633d

Please # to comment.