Class: TCellAgent::SensorEvents::DiscoveryEvent
Constant Summary
collapse
- DATABASE_TYPE =
'db'.freeze
Instance Attribute Summary
#ensure, #flush, #send
Instance Method Summary
collapse
#bucket_key, #calculate_offset, #post_process
Constructor Details
#initialize(route_id = nil) ⇒ DiscoveryEvent
7
8
9
10
|
# File 'lib/tcell_agent/sensor_events/discovery.rb', line 7
def initialize(route_id = nil)
super('discovery')
self['rid'] = route_id if route_id
end
|
Instance Method Details
#for_database(database, schema, table, field) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/tcell_agent/sensor_events/discovery.rb', line 12
def for_database(database, schema, table, field)
self['type'] = 'db'
self['db'] = database
self['schema'] = schema
self['table'] = table
self['field'] = field
end
|
#for_database_fields(database, schema, table, fields) ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/tcell_agent/sensor_events/discovery.rb', line 20
def for_database_fields(database, schema, table, fields)
self['type'] = 'db'
self['db'] = database
self['schema'] = schema
self['table'] = table
self['fields'] = fields
self
end
|