Class: Lsslog::Services::Base
- Inherits:
-
Object
- Object
- Lsslog::Services::Base
- Defined in:
- lib/lsslog/services/base.rb
Direct Known Subclasses
GetLssConfig, GetVersion, RemoveLssConfig, SetLssConfig, SetTransExpTime, WriteLog, WriteProdTransaction
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/lsslog/services/base.rb', line 9 def initialize @client = ::Lsslog::LssLogService::Stub.new(lss_host, :this_channel_is_insecure) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/lsslog/services/base.rb', line 7 def client @client end |
Class Method Details
.call(*args) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/lsslog/services/base.rb', line 13 def self.call(*args) response = new.call(*args) Lsslog.logger.info "#{self.name.demodulize}: #{response.to_json}" response rescue GRPC::BadStatus => e Lsslog.logger.info "ERROR: #{e.message}" end |