Public Writing methods. Write a message header to the wire. Compact Protocol messages contain the protocol version so we can migrate forwards in the future if need be.
(ctx context.Context, name string, typeId TMessageType, seqid int32)
| 155 | // Write a message header to the wire. Compact Protocol messages contain the |
| 156 | // protocol version so we can migrate forwards in the future if need be. |
| 157 | func (p *TCompactProtocol) WriteMessageBegin(ctx context.Context, name string, typeId TMessageType, seqid int32) error { |
| 158 | err := p.writeByteDirect(COMPACT_PROTOCOL_ID) |
| 159 | if err != nil { |
| 160 | return NewTProtocolException(err) |
| 161 | } |
| 162 | err = p.writeByteDirect((COMPACT_VERSION & COMPACT_VERSION_MASK) | ((byte(typeId) << COMPACT_TYPE_SHIFT_AMOUNT) & COMPACT_TYPE_MASK)) |
| 163 | if err != nil { |
| 164 | return NewTProtocolException(err) |
| 165 | } |
| 166 | _, err = p.writeVarint32(seqid) |
| 167 | if err != nil { |
| 168 | return NewTProtocolException(err) |
| 169 | } |
| 170 | e := p.WriteString(ctx, name) |
| 171 | return e |
| 172 | |
| 173 | } |
| 174 | |
| 175 | func (p *TCompactProtocol) WriteMessageEnd(ctx context.Context) error { return nil } |
| 176 |
nothing calls this directly
no test coverage detected