MCPcopy Create free account
hub / github.com/apache/thrift / WriteMessageBegin

Method WriteMessageBegin

lib/go/thrift/binary_protocol.go:108–133  ·  view source on GitHub ↗

** * Writing Methods */

(ctx context.Context, name string, typeId TMessageType, seqId int32)

Source from the content-addressed store, hash-verified

106 */
107
108func (p *TBinaryProtocol) WriteMessageBegin(ctx context.Context, name string, typeId TMessageType, seqId int32) error {
109 if p.cfg.GetTBinaryStrictWrite() {
110 version := uint32(VERSION_1) | uint32(typeId)
111 e := p.WriteI32(ctx, int32(version))
112 if e != nil {
113 return e
114 }
115 e = p.WriteString(ctx, name)
116 if e != nil {
117 return e
118 }
119 e = p.WriteI32(ctx, seqId)
120 return e
121 } else {
122 e := p.WriteString(ctx, name)
123 if e != nil {
124 return e
125 }
126 e = p.WriteByte(ctx, int8(typeId))
127 if e != nil {
128 return e
129 }
130 e = p.WriteI32(ctx, seqId)
131 return e
132 }
133}
134
135func (p *TBinaryProtocol) WriteMessageEnd(ctx context.Context) error {
136 return nil

Callers

nothing calls this directly

Calls 4

WriteI32Method · 0.95
WriteStringMethod · 0.95
WriteByteMethod · 0.95
GetTBinaryStrictWriteMethod · 0.80

Tested by

no test coverage detected