MCPcopy Create free account
hub / github.com/blobcache/blobcache / SetBody

Method SetBody

src/bcp/message.go:168–173  ·  view source on GitHub ↗
(body []byte)

Source from the content-addressed store, hash-verified

166}
167
168func (m *Message) SetBody(body []byte) {
169 h := m.Header()
170 h.SetBodyLen(len(body))
171 m.setHeader(h)
172 m.buf = append(m.buf[:HeaderLen], body...)
173}
174
175// Sendable is a type that can be sent in a message
176type Sendable interface {

Callers 8

PostFunction · 0.95
GetFunction · 0.95
doAskFunction · 0.95
doTellFunction · 0.95
SetErrorMethod · 0.95
TestMessageReadWriteFunction · 0.95
ServeBCPMethod · 0.80
handleAskFunction · 0.80

Calls 3

HeaderMethod · 0.95
setHeaderMethod · 0.95
SetBodyLenMethod · 0.80

Tested by 1

TestMessageReadWriteFunction · 0.76