MCPcopy
hub / github.com/davyxu/cellnet / MessageMetaByMsg

Function MessageMetaByMsg

meta.go:222–229  ·  view source on GitHub ↗

根据消息对象获得消息元信息

(msg interface{})

Source from the content-addressed store, hash-verified

220
221// 根据消息对象获得消息元信息
222func MessageMetaByMsg(msg interface{}) *MessageMeta {
223
224 if msg == nil {
225 return nil
226 }
227
228 return MessageMetaByType(reflect.TypeOf(msg))
229}
230
231// 根据id查找消息元信息
232func MessageMetaByID(id int) *MessageMeta {

Callers 4

EncodeMessageFunction · 0.92
DecodeMessageByTypeFunction · 0.92
MessageToNameFunction · 0.85
MessageToIDFunction · 0.85

Calls 1

MessageMetaByTypeFunction · 0.85

Tested by

no test coverage detected