MCPcopy
hub / github.com/micro/go-micro / ReadBody

Method ReadBody

client/rpc_codec.go:249–262  ·  view source on GitHub ↗
(b interface{})

Source from the content-addressed store, hash-verified

247}
248
249func (c *rpcCodec) ReadBody(b interface{}) error {
250 // read body
251 // read raw data
252 if v, ok := b.(*raw.Frame); ok {
253 v.Data = c.buf.rbuf.Bytes()
254 return nil
255 }
256
257 if err := c.codec.ReadBody(b); err != nil {
258 return errors.InternalServerError("go.micro.client.codec", err.Error())
259 }
260
261 return nil
262}
263
264func (c *rpcCodec) Close() error {
265 if err := c.buf.Close(); err != nil {

Callers

nothing calls this directly

Calls 4

InternalServerErrorFunction · 0.92
BytesMethod · 0.65
ReadBodyMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected