Class: Cosmos::TriggerGroupShare

Inherits:
Object
  • Object
show all
Defined in:
lib/cosmos/microservices/trigger_group_microservice.rb

Overview

Shared between the monitor thread and the manager thread to share the triggers. This should remain a thread safe implamentation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope:) ⇒ TriggerGroupShare

Returns a new instance of TriggerGroupShare.



232
233
234
235
236
# File 'lib/cosmos/microservices/trigger_group_microservice.rb', line 232

def initialize(scope:)
  @scope = scope
  @trigger_base = TriggerBase.new(scope: scope)
  @packet_base = PacketBase.new(scope: scope)
end

Instance Attribute Details

#packet_baseObject (readonly)

Returns the value of attribute packet_base.



230
231
232
# File 'lib/cosmos/microservices/trigger_group_microservice.rb', line 230

def packet_base
  @packet_base
end

#trigger_baseObject (readonly)

Returns the value of attribute trigger_base.



230
231
232
# File 'lib/cosmos/microservices/trigger_group_microservice.rb', line 230

def trigger_base
  @trigger_base
end

Class Method Details

.get_group(name:) ⇒ Object



226
227
228
# File 'lib/cosmos/microservices/trigger_group_microservice.rb', line 226

def self.get_group(name:)
  return name.split('__')[2]
end