MCPcopy Create free account
hub / github.com/ChainSafe/nodewatch-api / EncodeResult

Function EncodeResult

crawler/rpc/request/encode.go:101–104  ·  view source on GitHub ↗

EncodeResult writes the result code to the output writer.

(result ResponseCode, w io.Writer)

Source from the content-addressed store, hash-verified

99
100// EncodeResult writes the result code to the output writer.
101func EncodeResult(result ResponseCode, w io.Writer) error {
102 _, err := w.Write([]byte{uint8(result)})
103 return err
104}
105
106// EncodeChunk reads (decompressed) response message from the msg io.Reader,
107// and writes it as a chunk with given result code to the output writer. The compression is optional and may be nil.

Callers 2

EncodeChunkFunction · 0.85
StreamChunkFunction · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected