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

Method WriteMessageBegin

lib/go/thrift/json_protocol.go:59–77  ·  view source on GitHub ↗
(ctx context.Context, name string, typeId TMessageType, seqId int32)

Source from the content-addressed store, hash-verified

57}
58
59func (p *TJSONProtocol) WriteMessageBegin(ctx context.Context, name string, typeId TMessageType, seqId int32) error {
60 p.resetContextStack() // THRIFT-3735
61 if e := p.OutputListBegin(); e != nil {
62 return e
63 }
64 if e := p.WriteI32(ctx, THRIFT_JSON_PROTOCOL_VERSION); e != nil {
65 return e
66 }
67 if e := p.WriteString(ctx, name); e != nil {
68 return e
69 }
70 if e := p.WriteByte(ctx, int8(typeId)); e != nil {
71 return e
72 }
73 if e := p.WriteI32(ctx, seqId); e != nil {
74 return e
75 }
76 return nil
77}
78
79func (p *TJSONProtocol) WriteMessageEnd(ctx context.Context) error {
80 return p.OutputListEnd()

Callers

nothing calls this directly

Calls 5

WriteI32Method · 0.95
WriteStringMethod · 0.95
WriteByteMethod · 0.95
resetContextStackMethod · 0.80
OutputListBeginMethod · 0.80

Tested by

no test coverage detected