mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
spicy-redis: Add synchronization and pipeline support
Also adds some command support
This commit is contained in:
parent
4210e62e57
commit
97d26a689d
35 changed files with 2469 additions and 108 deletions
|
@ -0,0 +1,18 @@
|
|||
# @TEST-DOC: Test Zeek parsing "pipelined" data responses
|
||||
#
|
||||
# @TEST-EXEC: zeek -Cr $TRACES/redis/pipeline-with-commands.trace base/protocols/redis %INPUT >output
|
||||
# @TEST-EXEC: btest-diff output
|
||||
# @TEST-EXEC: btest-diff resp.log
|
||||
|
||||
# Sometimes commands aren't serialized, like when pipelining. This still works! So we
|
||||
# should handle this. This particular example has a few commands, amongst them a SET and
|
||||
# a GET.
|
||||
event RESP::set_command(c: connection, is_orig: bool, command: RESP::SetCommand)
|
||||
{
|
||||
print fmt("SET: %s %s", command$key, command$value);
|
||||
}
|
||||
|
||||
event RESP::get_command(c: connection, is_orig: bool, command: RESP::GetCommand)
|
||||
{
|
||||
print fmt("GET: %s", command);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue