Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports health checking #44

Closed
MichaelScofield opened this issue Sep 10, 2024 · 6 comments
Closed

Supports health checking #44

MichaelScofield opened this issue Sep 10, 2024 · 6 comments
Assignees

Comments

@MichaelScofield
Copy link

As GreptimeTeam/greptimedb#4674 suggests, a method like is_connected is good to have in our Go SDK.

@killme2008
Copy link

@daviderli614
Copy link
Member

@killme2008 @MichaelScofield
In the greptime healthcheck proto, the message returned by HealthCheckResponse is empty. It can only determine whether the network is connected. It should return a judgment similar to ready or ok field?

I added a PR and here are the results:

  • The GreptimeDB running:
go run main.go
2024/09/11 01:54:47 health check response:
  • The GreptimeDB stop:
go run main.go 
2024/09/11 01:54:38 rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 127.0.0.1:4001: connect: connection refused"
2024/09/11 01:54:38 health check response: <nil>

@MichaelScofield
Copy link
Author

@daviderli614 It's expected that the response body is empty. When the response is successfully returned, it means the server's connectivity is good, and that's all we need (fow now).

@daviderli614
Copy link
Member

@daviderli614 It's expected that the response body is empty. When the response is successfully returned, it means the server's connectivity is good, and that's all we need (fow now).

ok, PTAL: #45

@MichaelScofield
Copy link
Author

@daviderli614 I've merged #45 , please release it and don't forget to update our docs.

@daviderli614
Copy link
Member

daviderli614 commented Sep 23, 2024

A new version v0.5.2 was released to users:

go get -u github.com/GreptimeTeam/[email protected]

Use example: https://github.com/GreptimeTeam/greptimedb-ingester-go/tree/main/examples/healthcheck

#48
After this is merged, can write health check and hints docs together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants