From 70ba04a14b836b371734b3f30a9712ab066ac3d5 Mon Sep 17 00:00:00 2001 From: Seungmin Lee Date: Tue, 26 Nov 2024 20:27:00 +0000 Subject: [PATCH] Add ValkeyModule_ReplicateWithFlag description Signed-off-by: Seungmin Lee --- topics/modules-api-ref.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/topics/modules-api-ref.md b/topics/modules-api-ref.md index 70edbd4c..188a9a41 100644 --- a/topics/modules-api-ref.md +++ b/topics/modules-api-ref.md @@ -1937,6 +1937,20 @@ immediately. The command returns `VALKEYMODULE_ERR` if the format specifiers are invalid or the command name does not belong to a known command. +### `ValkeyModule_ReplicateWithFlag` + + int ValkeyModule_ReplicateWithFlag(ValkeyModuleCtx *ctx, + ValkeyModueFlag flag, + const char *cmdname, + const char *fmt, + ...); + +**Available since:** 8.1.0 + +Same as [`ValkeyModule_Replicate`](#ValkeyModule_Replicate), but can take ValkeyModuleFlag which allows specifying replication behavior through the parameter. +* `VALKEYMODULE_FLAG_DEFAULT` for default behavior (identical to [`ValkeyModule_Replicate`](#ValkeyModule_Replicate)) +* `VALKEYMODULE_FLAG_SKIP_VALIDATION` for bypassing command validation (It is strongly recommended to use only in trusted modules to prevent accidental replication of incorrect commands, which could compromise data consistency) + ### `ValkeyModule_ReplicateVerbatim`