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

Function MessageMetaByType

meta.go:204–219  ·  view source on GitHub ↗

根据类型查找消息元信息

(t reflect.Type)

Source from the content-addressed store, hash-verified

202
203// 根据类型查找消息元信息
204func MessageMetaByType(t reflect.Type) *MessageMeta {
205
206 if t == nil {
207 return nil
208 }
209
210 if t.Kind() == reflect.Ptr {
211 t = t.Elem()
212 }
213
214 if v, ok := metaByType[t]; ok {
215 return v
216 }
217
218 return nil
219}
220
221// 根据消息对象获得消息元信息
222func MessageMetaByMsg(msg interface{}) *MessageMeta {

Callers 3

WaitMessageMethod · 0.92
MessageMetaByMsgFunction · 0.85
MessageSizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected