Class: NWitchGRPCClient::Check
- Inherits:
-
Object
- Object
- NWitchGRPCClient::Check
- Defined in:
- lib/nwitch_grpc_client/check.rb
Class Method Summary collapse
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize ⇒ Check
constructor
A new instance of Check.
Constructor Details
#initialize ⇒ Check
Returns a new instance of Check.
8 9 10 11 12 13 |
# File 'lib/nwitch_grpc_client/check.rb', line 8 def initialize host = NWitchGRPCClient.configuration.grpc_host @stub = NWitchGRPC::Protobuf::Health::Stub .new(host, :this_channel_is_insecure) end |
Class Method Details
.check ⇒ Object
3 4 5 6 |
# File 'lib/nwitch_grpc_client/check.rb', line 3 def self.check service = self.new service.check end |
Instance Method Details
#check ⇒ Object
15 16 17 18 19 |
# File 'lib/nwitch_grpc_client/check.rb', line 15 def check req = @stub.check(build_req) req.status end |