Class: TCellAgent::SensorEvents::TCellSensorEvent
- Inherits:
-
Hash
- Object
- Hash
- TCellAgent::SensorEvents::TCellSensorEvent
- Defined in:
- lib/tcell_agent/sensor_events/sensor.rb
Direct Known Subclasses
AppConfigSettingEvent, AppRoutesSensorEvent, DiscoveryEvent, DlpEvent, ServerAgentPackagesSensorEvent
Instance Attribute Summary collapse
-
#ensure ⇒ Object
Returns the value of attribute ensure.
-
#flush ⇒ Object
Returns the value of attribute flush.
-
#send ⇒ Object
Returns the value of attribute send.
Instance Method Summary collapse
- #bucket_key ⇒ Object
- #calculate_offset(from_timestamp) ⇒ Object
-
#initialize(event_type) ⇒ TCellSensorEvent
constructor
A new instance of TCellSensorEvent.
Constructor Details
#initialize(event_type) ⇒ TCellSensorEvent
Returns a new instance of TCellSensorEvent.
11 12 13 14 15 16 17 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 11 def initialize(event_type) @send = true @flush = false @ensure = false @timestamp = Time.now.to_i self['event_type'] = event_type end |
Instance Attribute Details
#ensure ⇒ Object
Returns the value of attribute ensure.
9 10 11 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 9 def ensure @ensure end |
#flush ⇒ Object
Returns the value of attribute flush.
9 10 11 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 9 def flush @flush end |
#send ⇒ Object
Returns the value of attribute send.
9 10 11 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 9 def send @send end |
Instance Method Details
#bucket_key ⇒ Object
23 24 25 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 23 def bucket_key nil end |
#calculate_offset(from_timestamp) ⇒ Object
19 20 21 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 19 def calculate_offset() self['offset'] = - @timestamp end |