Skip to content

Commit

Permalink
feat: export ServerHealthy in INamingClient (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiangwuxian authored Nov 8, 2023
1 parent 4eb0559 commit 6930f82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clients/naming_client/naming_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ func (sc *NamingClient) Unsubscribe(param *vo.SubscribeParam) (err error) {
return err
}

// ServerHealthy ...
func (sc *NamingClient) ServerHealthy() bool {
return sc.serviceProxy.ServerHealthy()
}

// CloseClient ...
func (sc *NamingClient) CloseClient() {
sc.serviceProxy.CloseClient()
Expand Down
3 changes: 3 additions & 0 deletions clients/naming_client/naming_client_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ type INamingClient interface {
// GetAllServicesInfo use to get all service info by page
GetAllServicesInfo(param vo.GetAllServiceInfoParam) (model.ServiceList, error)

// ServerHealthy use to check the connectivity to server
ServerHealthy() bool

//CloseClient close the GRPC client
CloseClient()
}

0 comments on commit 6930f82

Please sign in to comment.