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

Support for implementing digest Module type callback using existing Module APIs #97

Open
KarthikSubbarao opened this issue Sep 18, 2024 · 1 comment · May be fixed by #102
Open

Support for implementing digest Module type callback using existing Module APIs #97

KarthikSubbarao opened this issue Sep 18, 2024 · 1 comment · May be fixed by #102

Comments

@KarthikSubbarao
Copy link
Member

KarthikSubbarao commented Sep 18, 2024

The Module data types provide a callback for digest and this is called when the DEBUG command is used on the module object for developing and testing for correctness. For modules to implement the digest callback, we will need wrapper functions in the valkeymodule-rs SDK written around the following existing Module APIs:

ValkeyModule_DigestAddStringBuffer
ValkeyModule_DigestAddLongLong
ValkeyModule_DigestEndSequence
ValkeyModule_GetKeyNameFromDigest
ValkeyModule_GetDbIdFromDigest

Example Valkey Module in C implementing the digest callback: https://github.com/valkey-io/valkey/blob/unstable/tests/modules/datatype2.c#L614-L634

@hahnandrew
Copy link

Hey @KarthikSubbarao, happy to pick this up 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants