This commit is contained in:
parent
490e2ffb45
commit
103b4dc017
5
main.go
5
main.go
@ -42,7 +42,7 @@ func initNacos() {
|
|||||||
}
|
}
|
||||||
portNum, _ := strconv.Atoi(port)
|
portNum, _ := strconv.Atoi(port)
|
||||||
pp := uint64(portNum)
|
pp := uint64(portNum)
|
||||||
success, _ := client.RegisterInstance(vo.RegisterInstanceParam{
|
success, err := client.RegisterInstance(vo.RegisterInstanceParam{
|
||||||
Ip: "172.30.0.90",
|
Ip: "172.30.0.90",
|
||||||
Port: pp,
|
Port: pp,
|
||||||
Weight: 10,
|
Weight: 10,
|
||||||
@ -50,6 +50,9 @@ func initNacos() {
|
|||||||
ServiceName: "api1",
|
ServiceName: "api1",
|
||||||
})
|
})
|
||||||
log.Println("Nacos注册结果: ", success)
|
log.Println("Nacos注册结果: ", success)
|
||||||
|
if err != nil {
|
||||||
|
log.Println("Nacos注册错误信息: ", err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
configClient, err := clients.NewConfigClient(configParam)
|
configClient, err := clients.NewConfigClient(configParam)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user