mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Start TEngine3.0
Start TEngine3.0
This commit is contained in:
17
Luban/Luban.ClientServer/Templates/proto/go/stub.tpl
Normal file
17
Luban/Luban.ClientServer/Templates/proto/go/stub.tpl
Normal file
@@ -0,0 +1,17 @@
|
||||
package {{namespace}}
|
||||
|
||||
import "bright/net"
|
||||
|
||||
type ProtocolFactory = func () net.Protocol
|
||||
|
||||
var ProtocolStub map[int]ProtocolFactory
|
||||
|
||||
func init() {
|
||||
ProtocolStub = make(map[int]ProtocolFactory)
|
||||
{{~for p in protos~}}
|
||||
ProtocolStub[{{p.id}}] = func () net.Protocol { return &{{p.go_full_name}}{} }
|
||||
{{~end~}}
|
||||
{{~for r in rpcs~}}
|
||||
ProtocolStub[{{r.id}}] = func () net.Protocol { return &{{r.go_full_name}}{} }
|
||||
{{~end~}}
|
||||
}
|
Reference in New Issue
Block a user