Skip to content

Instantly share code, notes, and snippets.

@ganmacs
Created November 9, 2018 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganmacs/8fd9c46a719094ac946a913bc0ac2727 to your computer and use it in GitHub Desktop.
Save ganmacs/8fd9c46a719094ac946a913bc0ac2727 to your computer and use it in GitHub Desktop.
require 'logger'
require 'grpc'
require 'grpc/health/checker'
module RubyLogger
def logger
Logger.new(STDOUT, level: :debug)
end
end
GRPC.extend(RubyLogger)
stub = Grpc::Health::V1::Health::Stub.new('127.0.0.1:50051', :this_channel_is_insecure)
p stub.check(Grpc::Health::V1::HealthCheckRequest.new(service: 'hoge'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment