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

Method ReadMessageBegin

lib/go/thrift/simple_json_protocol.go:349–366  ·  view source on GitHub ↗

Reading methods.

(ctx context.Context)

Source from the content-addressed store, hash-verified

347
348// Reading methods.
349func (p *TSimpleJSONProtocol) ReadMessageBegin(ctx context.Context) (name string, typeId TMessageType, seqId int32, err error) {
350 p.resetContextStack() // THRIFT-3735
351 if isNull, err := p.ParseListBegin(); isNull || err != nil {
352 return name, typeId, seqId, err
353 }
354 if name, err = p.ReadString(ctx); err != nil {
355 return name, typeId, seqId, err
356 }
357 bTypeId, err := p.ReadByte(ctx)
358 typeId = TMessageType(bTypeId)
359 if err != nil {
360 return name, typeId, seqId, err
361 }
362 if seqId, err = p.ReadI32(ctx); err != nil {
363 return name, typeId, seqId, err
364 }
365 return name, typeId, seqId, nil
366}
367
368func (p *TSimpleJSONProtocol) ReadMessageEnd(ctx context.Context) error {
369 return p.ParseListEnd()

Callers

nothing calls this directly

Calls 6

resetContextStackMethod · 0.95
ParseListBeginMethod · 0.95
ReadStringMethod · 0.95
ReadByteMethod · 0.95
ReadI32Method · 0.95
TMessageTypeTypeAlias · 0.70

Tested by

no test coverage detected