I was able to solve it with the following code snippet:

require 'grpc/health/checker'

# Implement health service.
health_svc = Grpc::Health::Checker.new
health_svc.add_status("plugin", Grpc::Health::V1::HealthCheckResponse::
ServingStatus::SERVING)

# Register gRPC server and handle.
host = '127.0.0.1'
s = GRPC::RpcServer.new
port = s.add_http2_port(host+':0', :this_port_is_insecure)
s.handle(health_svc)




On Monday, January 14, 2019 at 10:13:43 PM UTC+1, Michel Vocks wrote:
>
> Hello folks,
>
> I would like to use the ruby Health-Check implementation. I was able to 
> find the following documentation: 
> https://www.rubydoc.info/gems/grpc/Grpc/Health/Checker
> Anyway, if I want to implement that service I get the error "Error 
> occured: uninitialized constant Grpc". 
> I'm using the following code snippet:
>
>  # Implement health service.
>  health_svc = Grpc::Health::Checker.new
>  health_svc.add_status("myservice", GRPC::Core::StatusCodes::SERVING)
>
> I'm also unsure how to attach that service to my gRPC server? 
> Is there somewhere an official example available?
>
> Any help is much appreciated! :-)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/134486a7-c728-48d1-a21f-f5bba429df06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to