Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ValkeyModule_ReplicateWithFlag description #192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions topics/modules-api-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<span id="ValkeyModule_ReplicateVerbatim"></span>

### `ValkeyModule_ReplicateVerbatim`
Expand Down