Skip to content

Commit 95f9ed1

Browse files
committed
update
1 parent bccc376 commit 95f9ed1

17 files changed

+88
-2079
lines changed

codegen/tml/dao/template_dao.go

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
1818
"github.com/chenjie199234/Corelib/rpc"
1919
"github.com/chenjie199234/Corelib/web"
20+
"github.com/chenjie199234/Discovery/sdk"
2021
)
2122
2223
//var ExampleRpcApi example.ExampleRpcClient
@@ -62,6 +63,7 @@ func getRpcClientConfig() *rpc.ClientConfig {
6263
MaxMsgLen: 65535,
6364
MaxBufferedWriteMsgNum: 256,
6465
VerifyData: rpcverifydata,
66+
Discover: sdk.DefaultRpcDiscover,
6567
}
6668
}
6769
func getWebClientConfig() *web.ClientConfig {
@@ -75,6 +77,7 @@ func getWebClientConfig() *web.ClientConfig {
7577
SocketWBuf: 1024,
7678
SkipVerifyTLS: wc.SkipVerifyTls,
7779
CAs: wc.Cas,
80+
Discover: sdk.DefaultWebDiscover,
7881
}
7982
}`
8083

codegen/tml/gomod/template_gomod.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ const text = `module {{.}}
1111
go 1.16
1212
1313
require (
14-
github.com/chenjie199234/Config v0.0.3
15-
github.com/chenjie199234/Corelib v0.0.17
16-
github.com/chenjie199234/Discovery v0.0.3
14+
github.com/chenjie199234/Config v0.0.4
15+
github.com/chenjie199234/Corelib v0.0.18
16+
github.com/chenjie199234/Discovery v0.0.4
1717
github.com/fsnotify/fsnotify v1.4.9
1818
github.com/go-sql-driver/mysql v1.5.0
19-
github.com/golang/protobuf v1.4.3
19+
github.com/golang/protobuf v1.5.0
2020
github.com/segmentio/kafka-go v0.4.8
2121
go.mongodb.org/mongo-driver v1.5.0
22-
google.golang.org/protobuf v1.25.0
22+
google.golang.org/protobuf v1.26.0
2323
)`
2424

2525
const path = "./"

codegen/tml/mainfile/template_main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func main() {
3939
registerwg.Add(1)
4040
wg.Add(1)
4141
go func() {
42-
xrpc.StartRpcServer()
42+
xrpc.StartRpcServer(registerwg)
4343
select {
4444
case ch <- syscall.SIGTERM:
4545
default:
@@ -50,7 +50,7 @@ func main() {
5050
registerwg.Add(1)
5151
wg.Add(1)
5252
go func() {
53-
xweb.StartWebServer()
53+
xweb.StartWebServer(registerwg)
5454
select {
5555
case ch <- syscall.SIGTERM:
5656
default:

0 commit comments

Comments
 (0)