GrprHealthCheck implements the official Grpc health checking interface in Elixir. It can be used to check if Elixir based Grpc servers are up and running.
More on Grpc health checks:
Add this to your list of dependencies in mix.exs
:
def deps do
[
{:grpc_health_check, github: "renderedtext/grpc_health_check"}
]
end
And also add the health check server to your supervision tree:
services = [
...,
GrpcHealthCheck.Server
]
children = [
supervisor(GRPC.Server.Supervisor, [{services, port}])
]
Supervisor.start_link(children, opts)
If you're not running the GRPC workers as a part of a supervision tree, run the server alongside the rest of your GRPC workers.
The health check server will be running with you application.
Running mix healthcheck
will run the health check client and call the health
check service.