Skip to content

Provide Modules with the ability to reject CONFIG SETs on module configurations #123

@KarthikSubbarao

Description

@KarthikSubbarao

Today, Modules using valkeymodule-rs can create configs using the valkeymodule macro.

Modules can provide a callback that gets triggered on configuration change (after CONFIG SET).

But we do not have a way for Modules to reject CONFIG SET operations on Module configurations.

In Core valkey, we can do this by having the SDK accept a config_set callback, just like we allow modules to provide a on_configuration_change call back. If the Module returns an Error, the config set operation should be rejected. Else, it can be applied.

Current Usage:

    configurations: [
.....
        string: [
            ["string", &*CONFIGURATION_STRING, "default", ConfigurationFlags::DEFAULT, Some(Box::new(on_configuration_changed::<String, _>))],
        ],
......

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions