MCPcopy
hub / github.com/cubefs/cubefs / GetResultMsg

Method GetResultMsg

client/blockcache/bcache/packet.go:301–316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

299}
300
301func (p *BlockCachePacket) GetResultMsg() (m string) {
302 if p == nil {
303 return ""
304 }
305 switch p.ResultCode {
306 case proto.OpErr:
307 m = "Err: " + string(p.Data)
308 case proto.OpOk:
309 m = "Ok"
310 case proto.OpNotExistErr:
311 m = "NotExistErr"
312 default:
313 return fmt.Sprintf("Unknown ResultCode(%v)", p.ResultCode)
314 }
315 return
316}
317
318func (p *BlockCachePacket) MarshalHeader(out []byte) {
319 out[0] = p.Magic

Callers 3

GetMethod · 0.95
PutMethod · 0.95
EvictMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected