Class: GRPCToolbox::Client

Inherits:
Object
  • Object
show all
Includes:
Concurrent::Async
Defined in:
lib/grpc_toolbox/client.rb

Instance Method Summary collapse

Instance Method Details

#configObject



12
13
14
# File 'lib/grpc_toolbox/client.rb', line 12

def config
  @config ||= GRPCToolbox.configuration
end

#send_audit_request(params) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/grpc_toolbox/client.rb', line 16

def send_audit_request(params)
  stub = Auditor::Auditor::Stub.new(config.server,channel_credentials)

  begin
    message = stub.send_audit(
      Auditor::SendAuditRequest.new(audit_request_params(params))
    ).message
  rescue GRPC::BadStatus => e
    abort "ERROR: #{e.message}"
  end
end