(client bool, rpcID, inRPCID uint64, msg proto.Message)
| 503 | } |
| 504 | |
| 505 | func (ed *expectedData) newClientMessageEntry(client bool, rpcID, inRPCID uint64, msg proto.Message) *binlogpb.GrpcLogEntry { |
| 506 | logger := binlogpb.GrpcLogEntry_LOGGER_CLIENT |
| 507 | if !client { |
| 508 | logger = binlogpb.GrpcLogEntry_LOGGER_SERVER |
| 509 | } |
| 510 | data, err := proto.Marshal(msg) |
| 511 | if err != nil { |
| 512 | grpclogLogger.Infof("binarylogging_testing: failed to marshal proto message: %v", err) |
| 513 | } |
| 514 | return &binlogpb.GrpcLogEntry{ |
| 515 | Timestamp: nil, |
| 516 | CallId: rpcID, |
| 517 | SequenceIdWithinCall: inRPCID, |
| 518 | Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE, |
| 519 | Logger: logger, |
| 520 | Payload: &binlogpb.GrpcLogEntry_Message{ |
| 521 | Message: &binlogpb.Message{ |
| 522 | Length: uint32(len(data)), |
| 523 | Data: data, |
| 524 | }, |
| 525 | }, |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | func (ed *expectedData) newServerMessageEntry(client bool, rpcID, inRPCID uint64, msg proto.Message) *binlogpb.GrpcLogEntry { |
| 530 | logger := binlogpb.GrpcLogEntry_LOGGER_CLIENT |
no test coverage detected