Class: NWitchGRPCClient::Check

Inherits:
Object
  • Object
show all
Defined in:
lib/nwitch_grpc_client/check.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCheck

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

.checkObject



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

#checkObject



15
16
17
18
19
# File 'lib/nwitch_grpc_client/check.rb', line 15

def check
  req = @stub.check(build_req)

  req.status
end