(client bool, rpcID, inRPCID uint64, msg proto.Message)
| 527 | } |
| 528 | |
| 529 | func (ed *expectedData) newServerMessageEntry(client bool, rpcID, inRPCID uint64, msg proto.Message) *binlogpb.GrpcLogEntry { |
| 530 | logger := binlogpb.GrpcLogEntry_LOGGER_CLIENT |
| 531 | if !client { |
| 532 | logger = binlogpb.GrpcLogEntry_LOGGER_SERVER |
| 533 | } |
| 534 | data, err := proto.Marshal(msg) |
| 535 | if err != nil { |
| 536 | grpclogLogger.Infof("binarylogging_testing: failed to marshal proto message: %v", err) |
| 537 | } |
| 538 | return &binlogpb.GrpcLogEntry{ |
| 539 | Timestamp: nil, |
| 540 | CallId: rpcID, |
| 541 | SequenceIdWithinCall: inRPCID, |
| 542 | Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE, |
| 543 | Logger: logger, |
| 544 | Payload: &binlogpb.GrpcLogEntry_Message{ |
| 545 | Message: &binlogpb.Message{ |
| 546 | Length: uint32(len(data)), |
| 547 | Data: data, |
| 548 | }, |
| 549 | }, |
| 550 | } |
| 551 | } |
| 552 | |
| 553 | func (ed *expectedData) newHalfCloseEntry(client bool, rpcID, inRPCID uint64) *binlogpb.GrpcLogEntry { |
| 554 | logger := binlogpb.GrpcLogEntry_LOGGER_CLIENT |
no test coverage detected