(p *testpb.Payload)
| 88 | } |
| 89 | |
| 90 | func payloadToID(p *testpb.Payload) int32 { |
| 91 | if p == nil || len(p.Body) != 4 { |
| 92 | panic("invalid payload") |
| 93 | } |
| 94 | return int32(p.Body[0]) + int32(p.Body[1])<<8 + int32(p.Body[2])<<16 + int32(p.Body[3])<<24 |
| 95 | } |
| 96 | |
| 97 | func setIncomingStats(ctx context.Context, mdKey string, b []byte) context.Context { |
| 98 | md, ok := metadata.FromIncomingContext(ctx) |
no outgoing calls
no test coverage detected