mkmik/binlog

Add a "replay" command

mkmik opened this issue · 2 comments

mkmik commented

I'd like to be able to take one or more requests and send them (replay) to a gRPC server.

Examples

Replay one specific call:

$ binlog replay <my.binlog --call-id 123 --target localhost:1234

Replay all calls:

$ binlog replay <my.binlog --target localhost:1234

Replay all calls and send them to the peer addresses recorded in the binary log:

$ binlog replay <my.binlog

The input file is a binary log file, that includes both request messages and response messages. The replay command should ignore the response messages (if present) in the input file, and only send out request messages to the target gRPC service.

mkmik commented

implemented for unary calls:

$ binlog replay /tmp/simple.bin --target localhost:1122  --expand --proto ~/tmp/gorpc/helloworld/helloworld.proto --call-id 2
ID      When    Method
2       2022/05/19 16:55:03.931803      /helloworld.Greeter/SayHello
<-      {
  "message":  "Hello foo from mynewserver"
}
<-{s}   OK
mkmik commented

streaming calls also work now . closing