Commit 6d25bf66 authored by 赵文静's avatar 赵文静

增加日志

parent 3dca8b4b
Pipeline #5201 passed with stage
in 0 seconds
...@@ -50,7 +50,7 @@ type SpeechWsResp struct { ...@@ -50,7 +50,7 @@ type SpeechWsResp struct {
CurrentPage int `json:"currentPage"` CurrentPage int `json:"currentPage"`
TotalPages int `json:"totalPages"` TotalPages int `json:"totalPages"`
ItemsPerPage int `json:"itemsPerPage"` ItemsPerPage int `json:"itemsPerPage"`
Match int `json:"match"` Match interface{} `json:"match"`
Content interface{} `json:"content"` Content interface{} `json:"content"`
//Content []struct { //Content []struct {
// LinkUrl string `json:"linkUrl"` // LinkUrl string `json:"linkUrl"`
......
...@@ -32,7 +32,11 @@ func GrpcConn(serverName string) (*grpc.ClientConn, error) { ...@@ -32,7 +32,11 @@ func GrpcConn(serverName string) (*grpc.ClientConn, error) {
if err != nil { if err != nil {
return nil, fmt.Errorf("consul client init failed: %v", err) return nil, fmt.Errorf("consul client init failed: %v", err)
} }
entries, _, _ := client.Health().Service(serverName, "", true, nil) entries, _, err := client.Health().Service(serverName, "", true, nil)
if err != nil {
global.Logger.Errorf("consul get service %s failed: %v", serverName, err)
return nil, fmt.Errorf("consul get service %s failed: %v", serverName, err)
}
// 健康实例检查 // 健康实例检查
if len(entries) == 0 { if len(entries) == 0 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment