MCPcopy Create free account
hub / github.com/bytemode/pitaya-notes / Register

Method Register

service/handler.go:149–170  ·  view source on GitHub ↗

Register registers components 将组件Component中的复合Handler的方法遍历处理按照路由名字生成一个map放入HandleServices 一个组件生成一个Service存储组件本身和组件中handler的反射信息 同时将组件名字和service关联 且记录所有的路由和Handle的反射信息

(comp component.Component, opts []component.Option)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 3

NewServiceFunction · 0.92
ErrorfMethod · 0.80
ExtractHandlerMethod · 0.80