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

fix: wrong impl of rootHostEmulator.ProxyRedisCall #9

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: 6 additions & 8 deletions proxywasm/proxytest/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,13 @@ func (r *rootHostEmulator) ProxyRedisInit(upstreamData *byte, upstreamSize int,
}

// impl internal.ProxyWasmHost
func (r *rootHostEmulator) ProxyRedisCall(commandData *byte, commandSize int, keyData *byte, keySize int,
elementData *byte, elementSize int, cas *uint32) internal.Status {
command := internal.RawBytePtrToString(commandData, commandSize)
key := internal.RawBytePtrToString(keyData, keySize)
element := internal.RawBytePtrToString(elementData, elementSize)
func (r *rootHostEmulator) ProxyRedisCall(upstreamData *byte, upstreamSize int, queryData *byte, querySize int, calloutIDPtr *uint32) internal.Status {
upstream := internal.RawBytePtrToString(upstreamData, upstreamSize)
query := internal.RawBytePtrToString(queryData, querySize)

log.Printf("[redis call] command: %s", command)
log.Printf("[redis call] key: %s", key)
log.Printf("[redis call] element: %s", element)
log.Printf("[redis call] upstream: %s", upstream)
log.Printf("[redis call] query: %s", query)
log.Printf("[redis call] calloutID: %v", calloutIDPtr)

// TODO: implement

Expand Down